コード例 #1
0
ファイル: DiscountTests.cs プロジェクト: zaieda/RetailStore
        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
ファイル: DiscountTests.cs プロジェクト: zaieda/RetailStore
        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);
        }