public void RunningTotalIsZeroForEmptyBasket() { //Arrange var view = new MockedCheckOutView(); //Assert Assert.AreEqual(0, view.RunningTotal); }
public void CheckRunningTotalForBasketWithItems() { //Arrange var view = new MockedCheckOutView(); var presenter = new CheckOutPresenter(view, new MockedCheckOutRepository()); //Act presenter.GetRunningTotal(); //Assert Assert.AreEqual(8.95m, view.RunningTotal); }
public void CheckListContainsItems() { //Arrange var view = new MockedCheckOutView(); var presenter = new CheckOutPresenter(view, new MockedCheckOutRepository()); //Act presenter.GetItemsOrderedByPrice(); //Assert Assert.IsTrue(view.CheckoutItems.Count > 0); }
public void CheckListIsOrderedByPrice() { //Arrange var view = new MockedCheckOutView(); var presenter = new CheckOutPresenter(view, new MockedCheckOutRepository()); //Act presenter.GetItemsOrderedByPrice(); //Assert Assert.IsTrue(view.CheckoutItems.Count > 0); Assert.AreEqual(0.50m, view.CheckoutItems[0].Price); Assert.AreEqual(1.50m, view.CheckoutItems[1].Price); Assert.AreEqual(2.75m, view.CheckoutItems[2].Price); Assert.AreEqual(4.20m, view.CheckoutItems[3].Price); }