public static IProductSpecialConfigurationService CreateProductSpecialConfigurationService()
        {
            var productRepository          = CreateProductRepository();
            var createSpecialArgsValidator = new CreateSpecialArgsValidator(productRepository);
            var createBuyNForXAmountSpecialArgsValidator        = new CreateBuyNForXAmountSpecialArgsValidator(productRepository, createSpecialArgsValidator);
            var createBuyNGetMAtXPercentOffSpecialArgsValidator = new CreateBuyNGetMAtXPercentOffSpecialArgsValidator(productRepository, createSpecialArgsValidator);
            var createBuyNGetMOfEqualOrLesserValueAtXPercentOffSpecialArgsValidator = new CreateBuyNGetMOfEqualOrLesserValueAtXPercentOffSpecialArgsValidator(productRepository, createSpecialArgsValidator);

            return(new ProductSpecialConfigurationService(CreateMapper(), productRepository, createBuyNForXAmountSpecialArgsValidator, createBuyNGetMAtXPercentOffSpecialArgsValidator, createBuyNGetMOfEqualOrLesserValueAtXPercentOffSpecialArgsValidator));
        }
示例#2
0
 public CreateSpecialArgsValidatorTest()
 {
     _validator = new CreateSpecialArgsValidator(_productRepository);
 }
        public CreateBuyNGetMAtXPercentOffSpecialArgsValidatorTest()
        {
            var baseValidator = new CreateSpecialArgsValidator(_productRepository);

            _validator = new CreateBuyNGetMAtXPercentOffSpecialArgsValidator(_productRepository, baseValidator);
        }
示例#4
0
        public CreateBuyNForXAmountSpecialArgsValidatorTest()
        {
            var baseValidator = new CreateSpecialArgsValidator(_productRepository);

            _validator = new CreateBuyNForXAmountSpecialArgsValidator(_productRepository, baseValidator);
        }