示例#1
0
        public void ShouldApply5PercentsDiscountForCustomerOld()
        {
            //When the user will login role of user will be passed to resolver to get applicable discounts
            var discountservices = DiscountServiceResolver.DiscountServices(customerOld);
            var discount         = new DiscountService(discountservices).GetTotalDiscount(products);

            Assert.Equal(1265, discount);
        }
示例#2
0
        public void ShouldApply10PercentsDiscountForAffilate()
        {
            //When the user will login role of user will be passed to resolver to get applicable discounts
            var discountservices = DiscountServiceResolver.DiscountServices(affilate);
            var discount         = new DiscountService(discountservices).GetTotalDiscount(products);

            Assert.Equal(1895, discount);
        }