Esempio n. 1
0
        public void Should_return_0_when_basket_is_empty()
        {
            BasketPricer pricer = new BasketPricer();
            Basket       empty  = new Basket();

            decimal amount = pricer.GetTotalAmount(empty);

            Check.That(amount).Equals(0.0);
        }
Esempio n. 2
0
        public void Should_return_20_when_basket_contains_two_books_costing_10_euros()
        {
            BasketPricer pricer = new BasketPricer();
            Basket       basket = new Basket();

            basket.Add(new Book("Livre1", 10), 2);

            decimal amount = pricer.GetTotalAmount(basket);

            Check.That(amount).Equals(20.0);
        }
Esempio n. 3
0
        public void WhenICalculateTheTotalAmountOfTheBasket()
        {
            BasketPricer pricer = new BasketPricer();

            _context.TotalAmount = pricer.GetTotalAmount(_context.Basket);
        }