public void ReturnsRequestedPeriodWithDataAvailable() { Assert.IsTrue(_field.HasPeriodValue("3M")); Assert.AreEqual(1, _field.GetPeriodValue("3M")); Assert.AreEqual(1, _field.ThreeMonths); }
public void EmptyStore() { var field = new NormalizedBasicEPSGrowth(); Assert.IsFalse(field.HasValue); Assert.AreEqual(0, field.Value); Assert.AreEqual(0, field.FiveYears); Assert.AreEqual(0, field.OneYear); Assert.AreEqual(Enumerable.Empty <string>(), field.GetPeriodNames()); Assert.AreEqual(0, field.GetPeriodValue(QuantConnect.Data.Fundamental.Period.OneYear)); Assert.AreEqual(0, field.GetPeriodValue(QuantConnect.Data.Fundamental.Period.TenYears)); Assert.AreEqual(0, field.GetPeriodValues().Count); Assert.IsFalse(field.HasPeriodValue(QuantConnect.Data.Fundamental.Period.OneYear)); Assert.IsFalse(field.HasPeriodValue(QuantConnect.Data.Fundamental.Period.TenYears)); }