[CodeFactor] Apply fixes to commit 0606491

This commit is contained in:
codefactor-io
2026-03-12 19:37:50 +00:00
parent 060649192f
commit 8f79257155
384 changed files with 1197 additions and 1215 deletions
@@ -74,7 +74,7 @@ public sealed class Fisher04Tests
var fisher = new Fisher04(period: 5);
for (int i = 0; i < 20; i++)
{
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + i * 2));
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + (i * 2)));
}
Assert.True(fisher.FisherValue > 0, "Rising prices should produce positive Fisher04");
}
@@ -85,7 +85,7 @@ public sealed class Fisher04Tests
var fisher = new Fisher04(period: 5);
for (int i = 0; i < 20; i++)
{
fisher.Update(new TValue(DateTime.UtcNow, 200.0 - i * 2));
fisher.Update(new TValue(DateTime.UtcNow, 200.0 - (i * 2)));
}
Assert.True(fisher.FisherValue < 0, "Falling prices should produce negative Fisher04");
}
@@ -117,7 +117,7 @@ public sealed class Fisher04Tests
double[] data = new double[15];
for (int i = 0; i < data.Length; i++)
{
data[i] = 100 + i * 2;
data[i] = 100 + (i * 2);
}
for (int i = 0; i < data.Length; i++)
@@ -421,7 +421,7 @@ public sealed class Fisher04Tests
// Create a very strong uptrend
for (int i = 0; i < 30; i++)
{
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + i * 10));
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + (i * 10)));
}
// Fisher04 should be positive for uptrend
@@ -437,7 +437,7 @@ public sealed class Fisher04Tests
for (int i = 0; i < 30; i++)
{
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + i * 5));
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + (i * 5)));
}
// Both should be positive in uptrend
@@ -293,7 +293,7 @@ public sealed class Fisher04ValidationTests(ITestOutputHelper output) : IDisposa
// Keep feeding extreme values to push value1 toward clamp
for (int i = 0; i < 50; i++)
{
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + (i + 4) * 100.0), isNew: true);
fisher.Update(new TValue(DateTime.UtcNow, 100.0 + ((i + 4) * 100.0)), isNew: true);
}
// Fisher should remain finite (clamping prevents log(∞))