Пример #1
0
        public void RunningTotalIsZeroForEmptyBasket()
        {
            //Arrange
            var view = new MockedCheckOutView();

            //Assert
            Assert.AreEqual(0, view.RunningTotal);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
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);
        }
Пример #7
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);
        }
Пример #8
0
        public void RunningTotalIsZeroForEmptyBasket()
        {
            //Arrange
            var view = new MockedCheckOutView();

            //Assert
            Assert.AreEqual(0, view.RunningTotal);
        }