mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 13:08:04 +00:00
refactor: update NoWarn codes and clean up EmaValidationTests and EmaVectorTests
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NoWarn>S1944,S2053,S2222,S2259,S2583,S2589,S3329,S3655,S3776,S3900,S3949,S3966,S4158,S4347,S5773,S6781</NoWarn>
|
<NoWarn>S1144,S1944,S2053,S2222,S2259,S2583,S2589,S3329,S3655,S3776,S3900,S3949,S3966,S4158,S4347,S5773,S6781</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using QuanTAlib;
|
|||||||
|
|
||||||
namespace QuanTAlib.Tests;
|
namespace QuanTAlib.Tests;
|
||||||
|
|
||||||
public class EmaValidationTests : IDisposable
|
public class EmaValidationTests
|
||||||
{
|
{
|
||||||
private readonly TBarSeries _bars;
|
private readonly TBarSeries _bars;
|
||||||
private readonly TSeries _data;
|
private readonly TSeries _data;
|
||||||
@@ -45,11 +45,6 @@ public class EmaValidationTests : IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
// Cleanup if needed
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Validate_Skender()
|
public void Validate_Skender()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class EmaVectorTests
|
|||||||
{
|
{
|
||||||
int[] periods = { 10, 0, 20 };
|
int[] periods = { 10, 0, 20 };
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => new EmaVector(periods));
|
Assert.Throws<ArgumentOutOfRangeException>(() => new EmaVector(periods));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -46,7 +46,7 @@ public class EmaVectorTests
|
|||||||
{
|
{
|
||||||
int[] periods = { 10, -5, 20 };
|
int[] periods = { 10, -5, 20 };
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => new EmaVector(periods));
|
Assert.Throws<ArgumentOutOfRangeException>(() => new EmaVector(periods));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -54,7 +54,7 @@ public class EmaVectorTests
|
|||||||
{
|
{
|
||||||
double[] alphas = { 0.1, 0.0, 0.5 };
|
double[] alphas = { 0.1, 0.0, 0.5 };
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => new EmaVector(alphas));
|
Assert.Throws<ArgumentOutOfRangeException>(() => new EmaVector(alphas));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -62,7 +62,7 @@ public class EmaVectorTests
|
|||||||
{
|
{
|
||||||
double[] alphas = { 0.1, -0.1, 0.5 };
|
double[] alphas = { 0.1, -0.1, 0.5 };
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => new EmaVector(alphas));
|
Assert.Throws<ArgumentOutOfRangeException>(() => new EmaVector(alphas));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -70,7 +70,7 @@ public class EmaVectorTests
|
|||||||
{
|
{
|
||||||
double[] alphas = { 0.1, 1.5, 0.5 };
|
double[] alphas = { 0.1, 1.5, 0.5 };
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => new EmaVector(alphas));
|
Assert.Throws<ArgumentOutOfRangeException>(() => new EmaVector(alphas));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
Reference in New Issue
Block a user