public void Setup()
 {
     _offerValidatorMock = new Mock <IOfferVoucherValidator>();
     _offerValidatorMock.Setup(v => v.Validate(
                                   It.IsAny <List <Product> >(), It.IsAny <List <OfferVoucher> >()))
     .Returns(new List <InvalidVoucher>());
     _sut = new OfferVoucherThresholdValidator(_offerValidatorMock.Object);
 }
        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
            });
        }