Esempio n. 1
0
 public ProductController(ICategoryHelper categoryHelper, IProductHelper productHelper, ILogger <ProductModel> logger, CoreLearningContext coreLearningContext)
 {
     _categoryHelper      = categoryHelper;
     _productHelper       = productHelper;
     _logger              = logger;
     _coreLearningContext = coreLearningContext;
 }
Esempio n. 2
0
 public CompoundValidator(
     IProductCategorizer productCategorizer,
     IProductHelper productHelper,
     IRuleValidationEngine validator)
 {
     this.productCategorizer = productCategorizer;
     this.productHelper      = productHelper;
     this.validator          = validator;
 }
        public ProductHelperTests()
        {
            // Create a new mock for the ITaxCalculator
            _taxCalculatorMock = new Mock <ITaxCalculator>();

            // Setup the "Calculate" method to accept a double and a TaxType and always return the double value 5.
            _taxCalculatorMock.Setup(_ => _.Calculate(It.IsAny <double>(), It.IsAny <TaxType>())).Returns(5);

            // Create a new ProductHelper class with the mocked ITaxCalculator
            _sut = new ProductHelper(_taxCalculatorMock.Object);
        }
Esempio n. 4
0
        public QueryInterpreter(
            IProductCategorizer productCategorizer,
            IProductHelper productHelper,
            ICompoundValidator validator,
            IDictionary <string, string> intergalacticProductsCache,
            IDictionary <string, decimal> earthyProductsCache)
        {
            if (intergalacticProductsCache == null)
            {
                throw new ArgumentNullException("intergalacticProductsCache");
            }

            if (earthyProductsCache == null)
            {
                throw new ArgumentNullException("earthyProductsCache");
            }

            this.productCategorizer         = productCategorizer;
            this.productHelper              = productHelper;
            this.validator                  = validator;
            this.intergalacticProductsCache = intergalacticProductsCache;
            this.earthyProductsCache        = earthyProductsCache;
        }
Esempio n. 5
0
 public void Setup()
 {
     this.converter     = new Mock <IConverterStrategy>(MockBehavior.Strict);
     this.productHelper = new ProductHelper(this.converter.Object);
 }
 public ProductController(IProductHelper productHelper)
 {
     this.productHelper = productHelper;
 }
Esempio n. 7
0
 public ReceiptsController(DBContext context, IReceiptHelper receiptHelper, IProductHelper productHelper)
 {
     _context       = context;
     _receiptHelper = receiptHelper;
     _productHelper = productHelper;
 }
Esempio n. 8
0
 public ProductController(IProductHelper productHelper, IMenuHelper menuHelper) : base(menuHelper)
 {
     this.productHelper = productHelper;
 }
Esempio n. 9
0
 public HomeController(IMenuHelper menuHelper, IBannerHelper bannerHelper, IProductHelper productHelper) : base(menuHelper)
 {
     this.bannerHelper  = bannerHelper;
     this.productHelper = productHelper;
 }
Esempio n. 10
0
 public AddProductCommandHandler([NotNull] ApplicationDbContext context, IProductHelper productHelper)
 {
     _context       = context;
     _productHelper = productHelper;
 }
 public ProductModelController(IProductHelper productHelper, IManufacturerHelper manufacturerHelper)
 {
     this.productHelper      = productHelper;
     this.manufacturerHelper = manufacturerHelper;
 }
Esempio n. 12
0
 public ProductsController(DBContext context, IProductHelper productHelper, IProductSummaryHelper productSummaryHelper)
 {
     _context              = context;
     _productHelper        = productHelper;
     _productSummaryHelper = productSummaryHelper;
 }
Esempio n. 13
0
 public ProductServices(IProductRepository productRepository, IProductHelper productHelper, AmqpService amqpService)
 {
     _productRepository = productRepository ?? throw new ArgumentNullException(nameof(amqpService));
     _productHelper     = productHelper ?? throw new ArgumentNullException(nameof(amqpService));
     _amqpService       = amqpService ?? throw new ArgumentNullException(nameof(amqpService));
 }
Esempio n. 14
0
 public ValuesController(IProductHelper productHelper)
 {
     _productHelper = productHelper;
 }