Ejemplo n.º 1
0
        public void Apply_DoesNotApplyWhenNoBasketItems()
        {
            var emptyStartingCheckoutState = CheckoutState.Initialise(new BasketItem[0]);
            var resultingCheckoutState     = _giftVoucher.Apply(emptyStartingCheckoutState);

            AssertDiscountWasNotApplied(resultingCheckoutState);
        }
Ejemplo n.º 2
0
        public void Apply_DoesNotApplyToEmptyBaskets()
        {
            var emptyStartingState = CheckoutState.Initialise(new BasketItem[0]);

            var offerVoucher   = CreateVoucherWithoutRestrictedCategory();
            var resultingState = offerVoucher.Apply(emptyStartingState);

            AssertDiscountWasNotApplied(resultingState);
        }
Ejemplo n.º 3
0
 private static CheckoutState CheckoutStateWith(params BasketItem[] basketItems)
 {
     return(CheckoutState.Initialise(basketItems));
 }