mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 11:08:05 +00:00
- Cleaned up code by removing unused using directives from various test and implementation files in the trends and volume directories. - This includes files related to HMA, HTIT, JMA, KAMA, LSMA, MAMA, MGDI, PWMA, RMA, SMA, SSF, SUPER, T3, TEMA, TRIMA, USF, VIDYA, WMA, ATR, ADL, and ADOSC. - Improved code readability and maintainability by streamlining imports.
33 lines
739 B
C#
33 lines
739 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()
|
|
{
|
|
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);
|
|
}
|
|
}
|