Example #1
0
        public static Basket BasketFullOfBooks_NoDiscount()
        {
            var basket = new Basket();

            basket.AddBooks(BooksWithNoDiscount());
            return(basket);
        }
Example #2
0
        public static Basket BasketFullOfBooks_TestScenario()
        {
            var basket = new Basket();

            basket.AddBooks(BooksTestScenario());
            return(basket);
        }
Example #3
0
        public static Basket BasketFullOFBooks_FifteenPercentDiscount()
        {
            var basket = new Basket();

            basket.AddBooks(BooksWithFifteenDiscount());
            return(basket);
        }
Example #4
0
        public static Basket BasketFullOFBooks_ThirtyFivePercentDiscount()
        {
            var basket = new Basket();

            basket.AddBooks(BooksWithThirtyFiveDiscount());
            return(basket);
        }
Example #5
0
        public void Total_ShouldEqual(double expected, int[] bookVolumeQuantities)
        {
            Basket basket = new Basket();

            for (int i = 0; i < bookVolumeQuantities.Length; i++)
            {
                basket.AddBooks((BookVolumeEnum)(i + 1), bookVolumeQuantities[i]);
            }

            double actual = basket.TotalPrice;

            Assert.Equal(expected, actual);
        }