示例#1
0
        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
            });
        }
示例#2
0
 public void Setup()
 {
     _sut = new SingleOfferVoucherValidator();
 }