public void WhenOfferVoucherAddedOnlyOneAdded() { var basket = new Basket(); basket.AddProduct("hat2500", 1); basket.AddProduct("jumper2600", 2); basket.AddOfferVoucher("YYY-YYY"); basket.AddOfferVoucher("YYY-YYY"); Assert.Equal(72m, basket.TotalPrice); }
public void WhenTotalPriceOfferVoucherAddedBasketTotalPriceIsReduced() { var basket = new Basket(); basket.AddProduct("hat2500", 1); basket.AddProduct("jumper2600", 1); basket.AddOfferVoucher("YYY-YYY"); Assert.Equal(46m, basket.TotalPrice); }
public void Basket5() { var basket = new Basket(); basket.AddProduct("hat2500", 1); basket.AddProduct("gift3000", 1); basket.AddOfferVoucher("YYY-YYY"); Assert.Equal(55m, basket.TotalPrice); Assert.Equal("You have not reached the spend threshold for voucher YYY-YYY. Spend another £25.01 to receive £5.00 discount from your basket total.", basket.Message); }
public void Basket4() { var basket = new Basket(); basket.AddProduct("hat2500", 1); basket.AddProduct("jumper2600", 1); basket.AddGiftVoucher("XXX-XXX", 1); basket.AddOfferVoucher("YYY-YYY"); Assert.Equal(41m, basket.TotalPrice); }