mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-12 23:58:04 +00:00
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat> Co-authored-by: Warp <agent@warp.dev>
33 lines
745 B
C#
33 lines
745 B
C#
using Skender.Stock.Indicators;
|
|
|
|
namespace QuanTAlib.Tests;
|
|
|
|
public sealed class SmaToleranceTests : IDisposable
|
|
{
|
|
private readonly ValidationTestData _testData;
|
|
|
|
public SmaToleranceTests()
|
|
{
|
|
_testData = new ValidationTestData();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_testData.Dispose();
|
|
}
|
|
|
|
[Fact]
|
|
public void Check_Skender_Tolerance()
|
|
{
|
|
const int period = 20;
|
|
var sma = new Sma(period);
|
|
var qResult = sma.Update(_testData.Data);
|
|
var sResult = _testData.SkenderQuotes.GetSma(period).ToList();
|
|
|
|
ValidationHelper.VerifyData(qResult, sResult, (s) => s.Sma);
|
|
|
|
// Add explicit assertion to satisfy SonarQube
|
|
Assert.True(qResult.Count > 0);
|
|
}
|
|
}
|