Beispiel #1
0
        public void FindAmountOfElegableProduct_AmountOfDiscountables_CorrectAmount()
        {
            checkout.clearCart();
            ArrayList products  = new ArrayList();
            ArrayList discounts = new ArrayList();

            products.Add(new Product(1, "Toaster", 11.99m));
            products.Add(new Product(1, "Toaster", 11.99m));
            products.Add(new Product(1, "Toaster", 11.99m));
            products.Add(new Product(2, "Oven", 11.99m));
            DiscountCalculator disCalc = new DiscountCalculator(discounts, products);

            Assert.AreEqual(3, disCalc.FindAmountOfElegableProduct(1));
        }
 public void Total_BoughtNothing_TotalIsZero()
 {
     checkout.clearCart();
     Assert.AreEqual(checkout.DiscountedTotal(), 0);
 }