Beispiel #1
0
        public void Check_The_Price_Didnot_Change()
        {
            _calculatorArgs.Brand = null;

            var strategy = new BrandGroupDiscountStrategy();
            var discountCalculatorService = new DiscountCalculatorService(strategy);
            var finalPrice = discountCalculatorService.ApplyDiscountMethod(_calculatorArgs);

            Assert.AreEqual(4000, finalPrice);
        }
Beispiel #2
0
        public void When_Apply_Brand_Group_Discount_The_Cost_Is_5_Percent_Lest()
        {
            _calculatorArgs.Brand    = "Nokia";
            _calculatorArgs.Discount = 0.95m;

            var strategy = new BrandGroupDiscountStrategy();
            var discountCalculatorService = new DiscountCalculatorService(strategy);
            var finalPrice = discountCalculatorService.ApplyDiscountMethod(_calculatorArgs);

            Assert.AreEqual(1425, finalPrice);
        }