public void PurchaseMade_CoinsInserted_FirstDisplayThankYouThenInsertCoins() { var sut = new DisplayModule(); sut.UpdateInsertedCoinValue(.50m); sut.PurchaseMade(); sut.UpdateInsertedCoinValue(0m); Assert.AreEqual("THANK YOU", sut.ReadOut); Assert.AreEqual("INSERT COINS", sut.ReadOut); }
public void DefaultState_CoinsInserted_DisplayTotalValue() { var sut = new DisplayModule(); sut.UpdateInsertedCoinValue(0.15m); sut.DefaultState(); Assert.AreEqual("$0.15", sut.ReadOut); }
public void ProductSoldOut_CoinsInserted_ReadOfDisplay_FirstDisplayProductPriceThenInsertCoins() { var sut = new DisplayModule(); sut.UpdateInsertedCoinValue(.50m); sut.ProductNotAvailable(); Assert.AreEqual("SOLD OUT", sut.ReadOut); Assert.AreEqual("$0.50", sut.ReadOut); }
public void PurchaseMadeInsufficientFunds_CoinsInserted_FirstDisplayProductPriceThenInsertCoins() { var sut = new DisplayModule(); sut.UpdateInsertedCoinValue(.05m); sut.InsufficientFundsForProduct(.25m); Assert.AreEqual("PRICE: $0.25", sut.ReadOut); Assert.AreEqual("$0.05", sut.ReadOut); }