public void Setup() { var giftVoucherValueValidator = new GiftVoucherValueValidator(); var giftVouchersNotInTotalValidator = new GiftVouchersNotInTotalValidator(giftVoucherValueValidator); _giftvalidator = new GiftVoucherValidatorAdaptor(giftVouchersNotInTotalValidator); var offerSingleValidator = new SingleOfferVoucherValidator(); var offerVoucherThresholdValidator = new OfferVoucherThresholdValidator(offerSingleValidator); var offerRestrictionValidator = new OfferVoucherRestrictionValidator(offerVoucherThresholdValidator); _offerValidator = new OfferVoucherValidatorAdaptor(offerRestrictionValidator); _basket = new Basket(new List <IVoucherValidator> { _giftvalidator, _offerValidator }); }
public void Setup() { _sut = new SingleOfferVoucherValidator(); }