mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 10:38:05 +00:00
feat(tests): add comprehensive tests for LinReg, StdDev, Variance, and Mama indicators; enhance Pwma constructor with null check; improve coverage path mappings in Qodana configuration
This commit is contained in:
@@ -8,6 +8,7 @@ public class PwmaTests
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => new Pwma(0));
|
||||
Assert.Throws<ArgumentException>(() => new Pwma(-1));
|
||||
Assert.Throws<ArgumentNullException>(() => new Pwma(null!, 10));
|
||||
|
||||
var pwma = new Pwma(10);
|
||||
Assert.NotNull(pwma);
|
||||
|
||||
@@ -56,6 +56,7 @@ public sealed class Pwma : AbstractBase
|
||||
|
||||
public Pwma(ITValuePublisher source, int period) : this(period)
|
||||
{
|
||||
if (source == null) throw new ArgumentNullException(nameof(source));
|
||||
source.Pub += (item) => Update(item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user