Exemple #1
0
        public void TestScenarioD()
        {
            var cp         = new CalculatePromotion();
            var cart       = CalculatePromotion.CreateCart(30, 50, 25, 20);
            var promo      = PromotionOffers.CreatePromotion();
            var totalprice = cp.GetOrderValue(cart, promo);

            Assert.AreEqual(totalprice, 3125);
        }
Exemple #2
0
        public void TestScenarioC()
        {
            var cp         = new CalculatePromotion();
            var cart       = CalculatePromotion.CreateCart(3, 5, 1, 1);
            var promo      = PromotionOffers.CreatePromotion();
            var totalprice = cp.GetOrderValue(cart, promo);

            Assert.AreEqual(totalprice, 280);
        }