public void getValue() { Assert.AreEqual(constantIndicator.GetValue(0), 30.33M); Assert.AreEqual(constantIndicator.GetValue(1), 30.33M); Assert.AreEqual(constantIndicator.GetValue(10), 30.33M); Assert.AreEqual(constantIndicator.GetValue(30), 30.33M); }
public void ConstantIndicator() { TaTestsUtils.AssertDecimalEquals(_constantIndicator.GetValue(0), "30.33"); TaTestsUtils.AssertDecimalEquals(_constantIndicator.GetValue(1), "30.33"); TaTestsUtils.AssertDecimalEquals(_constantIndicator.GetValue(10), "30.33"); TaTestsUtils.AssertDecimalEquals(_constantIndicator.GetValue(30), "30.33"); }
public void GetValueWithNullTimeSeries() { var constant = new ConstantIndicator <Decimal>(Decimal.Ten); Assert.AreEqual(Decimal.Ten, constant.GetValue(0)); Assert.AreEqual(Decimal.Ten, constant.GetValue(100)); Assert.IsNull(constant.TimeSeries); var sma = new SmaIndicator(constant, 10); Assert.AreEqual(Decimal.Ten, sma.GetValue(0)); Assert.AreEqual(Decimal.Ten, sma.GetValue(100)); Assert.IsNull(sma.TimeSeries); }
public void getValueWithNullTimeSeries() { ConstantIndicator <decimal> constant = new ConstantIndicator <decimal>(Decimals.TEN); Assert.AreEqual(Decimals.TEN, constant.GetValue(0)); Assert.AreEqual(Decimals.TEN, constant.GetValue(100)); Assert.IsNull(constant.TimeSeries); SMAIndicator sma = new SMAIndicator(constant, 10); Assert.AreEqual(Decimals.TEN, sma.GetValue(0)); Assert.AreEqual(Decimals.TEN, sma.GetValue(100)); Assert.IsNull(sma.TimeSeries); }