Exemple #1
0
        public void TestMethod_ScenarioA()
        {
            var shoppingCart = new Dictionary <Product, int>();

            shoppingCart.Add(products["A"], 1);
            shoppingCart.Add(products["B"], 1);
            shoppingCart.Add(products["C"], 1);

            decimal finalCartAmount = promotionExecutor.ApplyPromotionsAll(shoppingCart);

            Assert.AreEqual(100, finalCartAmount);
        }
Exemple #2
0
        public void TestMethod_ScenarioA()
        {
            var shoppingCart = new Dictionary <Product, int>();

            shoppingCart.Add(products["A"], 1);
            shoppingCart.Add(products["B"], 1);
            shoppingCart.Add(products["C"], 1);

            decimal finalCartAmount = promotionExecutor.ApplyPromotionsAll(shoppingCart);

            Console.WriteLine("The expected cart amount {0} and final amount {1}", 100, finalCartAmount);

            //Assert.AreEqual(100, finalCartAmount);
        }