mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 18:48:05 +00:00
feat: Implement Ehlers Ultimate Smoother Filter (USF) with documentation and tests
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TradingPlatform.BusinessLayer;
|
||||
using Xunit;
|
||||
|
||||
namespace QuanTAlib.Quantower.Tests;
|
||||
|
||||
public class UsfIndicatorTests
|
||||
{
|
||||
[Fact]
|
||||
public void Indicator_InitializesCorrectly()
|
||||
{
|
||||
var indicator = new UsfIndicator();
|
||||
Assert.Equal(20, indicator.Period);
|
||||
Assert.Equal("USF 20:Close", indicator.ShortName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Indicator_ProcessesData()
|
||||
{
|
||||
var indicator = new UsfIndicator();
|
||||
|
||||
// Simulate Init
|
||||
indicator.GetType().GetMethod("OnInit", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)?.Invoke(indicator, null);
|
||||
|
||||
Assert.NotNull(indicator);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user