mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 19:48:05 +00:00
- Removed unnecessary blank lines in multiple test files to enhance readability. - Ensured consistent spacing and formatting in the `Trima`, `Usf`, `Vidya`, `Wma`, and `Atr` test classes. - Updated comments for clarity and consistency in the `Atr` and `Adl` classes. - Adjusted project files for better structure and maintainability.
37 lines
819 B
C#
37 lines
819 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Skender.Stock.Indicators;
|
|
using Xunit;
|
|
|
|
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);
|
|
}
|
|
}
|