public void calculateMidPointTest() { MidPoint_Accessor target = new MidPoint_Accessor(); Candlestick candlestick = new Candlestick() { HighPrice = 5, LowPrice = 4 }; double expected = 4.5; double actual; actual = target.calculateMidPoint(candlestick); Assert.AreEqual(expected, actual); candlestick.HighPrice = 5; candlestick.LowPrice = 5; expected = 5; actual = target.calculateMidPoint(candlestick); Assert.AreEqual(expected, actual); }
public void getTrendTest() { MidPoint_Accessor target = new MidPoint_Accessor(); Candlestick candlestick = new Candlestick() { HighPrice = 5, LowPrice = 4, Quote = 4.7 }; Trend expected = Trend.Bullish; Trend actual; actual = target.getTrend(candlestick); Assert.AreEqual(expected, actual); candlestick.Quote = 4.4; expected = Trend.Bearish; actual = target.getTrend(candlestick); Assert.AreEqual(expected, actual); candlestick.Quote = 4.5; expected = Trend.UnTrended; actual = target.getTrend(candlestick); Assert.AreEqual(expected, actual); }
public void MidPointConstructorTest() { MidPoint_Accessor target = new MidPoint_Accessor(); Assert.Inconclusive("TODO: Implement code to verify target"); }