public void Gift_voucher_does_not_reduce_price_of_gift_voucher() { _target.Add(new LineItem(new GiftVoucher("ABC", 25m))); _target.Apply(new GiftVoucher("XXX", 10m)); _target.Total.Should().Be(25m); }
public void AnAIsFifty() { Event[] events = { new ItemScanned("A", 50) }; var basket = new Basket(); basket.Apply(events); Assert.Equal(50, basket.Total); }
public void TwoAsAreOneHundred() { Event[] events = { new ItemScanned("A", 50), new ItemScanned("A", 50) }; var basket = new Basket(); basket.Apply(events); Assert.Equal(100, basket.Total); }
public void ThreeAsAreOneTwenty() { Event[] events = { new ItemScanned("A", 50), new ItemScanned("A", 50), new ItemScanned("A", 50), new DiscountEarned(30) }; var basket = new Basket(); basket.Apply(events); Assert.Equal(120, basket.Total); }
public void WhenIApply(GiftVoucher voucher) { _target.Apply(voucher); }