示例#1
0
        public void TwoBPromotionApplied()
        {
            _discountedDoubleBProducts.AddRange(Enumerable.Repeat(new Product("B", 30m), 2));
            var discount = _doubleBPromotion.CalculateDiscount(_discountedDoubleBProducts);

            discount.ShouldBe(15);
        }
示例#2
0
        public void MixProductPromotionApplied()
        {
            _discountedCombiProducts.Add(new Product("C", 20m));
            _discountedCombiProducts.Add(new Product("D", 15m));
            var discount = _mixProductPromotion.CalculateDiscount(_discountedCombiProducts);

            discount.ShouldBe(5);
        }
示例#3
0
        public void NotEnoughItemsForOfferToApply()
        {
            var discount = _tripleAPromotion.CalculateDiscount(_noPromotionProducts);

            discount.ShouldBe(0m);
        }