test: setup common stability and robustness properties tracking

This commit is contained in:
Miha Kralj
2026-02-27 12:50:05 -08:00
parent 4ab3a7fb53
commit 769a923a24
287 changed files with 1314 additions and 867 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ public class MaenvIndicatorTests
Assert.Equal(20, ind.Period);
Assert.Equal(1.0, ind.Percentage);
Assert.Equal(MaenvType.EMA, ind.MaType);
Assert.Equal(MaenvType.EMA, ind.maType);
Assert.Equal(PriceType.Close, ind.SourceType);
Assert.True(ind.ShowColdValues);
Assert.Equal("Maenv - Moving Average Envelope", ind.Name);
@@ -30,7 +30,7 @@ public class MaenvIndicatorTests
[Fact]
public void ShortName_ReflectsParameters()
{
var ind = new MaenvIndicator { Period = 12, Percentage = 2.5, MaType = MaenvType.SMA };
var ind = new MaenvIndicator { Period = 12, Percentage = 2.5, maType = MaenvType.SMA };
Assert.Contains("12", ind.ShortName, StringComparison.Ordinal);
Assert.Contains("2.5", ind.ShortName, StringComparison.Ordinal);
Assert.Contains("SMA", ind.ShortName, StringComparison.Ordinal);
@@ -209,11 +209,11 @@ public class MaenvIndicatorTests
}
[Fact]
public void AllMaTypes_ProduceFiniteResults()
public void AllmaTypes_ProduceFiniteResults()
{
foreach (MaenvType maType in Enum.GetValues<MaenvType>())
{
var ind = new MaenvIndicator { Period = 10, Percentage = 2.0, MaType = maType };
var ind = new MaenvIndicator { Period = 10, Percentage = 2.0, maType = maType };
ind.Initialize();
var now = DateTime.UtcNow;
+1 -1
View File
@@ -347,7 +347,7 @@ public class MaenvTests
}
[Fact]
public void Maenv_AllMaTypes_ProduceFiniteResults()
public void Maenv_AllmaTypes_ProduceFiniteResults()
{
var gbm = new GBM(startPrice: 100, mu: 0.01, sigma: 0.1, seed: 42);
+2 -2
View File
@@ -440,7 +440,7 @@ public sealed class MaenvValidationTests : IDisposable
}
[Fact]
public void Validate_MaTypesDifferent()
public void Validate_maTypesDifferent()
{
// Different MA types should produce different results (except for first bar)
var indSma = new Maenv(10, 2.0, MaenvType.SMA);
@@ -595,4 +595,4 @@ public sealed class MaenvValidationTests : IDisposable
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
}