public void ReturnsCorrectResult( decimal closingPrice, decimal fastSMA, decimal slowSMA, TAZ expectedResult) { Assert.AreEqual(expectedResult, Service.GetTAZ(closingPrice, fastSMA, slowSMA)); }
public TechnicalAnalysisBuilder SetTAZ(string value) { if (Enum.TryParse <TAZ>(value, true, out var result)) { _taz = result; } return(this); }
public override int GetHashCode() { var hashCode = 1276244321; hashCode = hashCode * -1521134295 + FastSMA.GetHashCode(); hashCode = hashCode * -1521134295 + SlowSMA.GetHashCode(); hashCode = hashCode * -1521134295 + TAZ.GetHashCode(); hashCode = hashCode * -1521134295 + Trend.GetHashCode(); return(hashCode); }
public TechnicalAnalysisBuilder SetTAZ(TAZ value) { _taz = value; return(this); }
public void ShouldReturnValidObject_WhenValidInput(decimal fastSMA, decimal slowSMA, TAZ taz, Trend trend) { var result = new TechnicalAnalysisBuilder() .SetFastSMA(fastSMA) .SetSlowSMA(slowSMA) .SetTAZ(taz.ToString()) .SetTrend(trend.ToString()) .Build(); result.Should().NotBeNull(); result.FastSMA.Should().Be(fastSMA); result.SlowSMA.Should().Be(slowSMA); result.TAZ.Should().Be(taz); result.Trend.Should().Be(trend); }