Beispiel #1
0
 public DataImportController(DataContext db, ICategoryService categoryService,
                             IProductFinder productFinder, IProductService productService)
     : base(db)
 {
     this.categoryService = categoryService;
     this.productFinder   = productFinder;
     this.productService  = productService;
 }
 public DataImportController(DataContext db, ICategoryService categoryService,
     IProductFinder productFinder, IProductService productService)
     : base(db)
 {
     this.categoryService = categoryService;
     this.productFinder = productFinder;
     this.productService = productService;
 }
Beispiel #3
0
 public ProductController(ISettingService settings, ICategoryService categoryService,
                          IProductFinder productFinder, IUploadService uploadService)
 {
     this.settings        = settings;
     this.categoryService = categoryService;
     this.productFinder   = productFinder;
     this.uploadService   = uploadService;
 }
 public ProductController(ISettingService settings, ICategoryService categoryService,
     IProductFinder productFinder, IUploadService uploadService)
 {
     this.settings = settings;
     this.categoryService = categoryService;
     this.productFinder = productFinder;
     this.uploadService = uploadService;
 }
Beispiel #5
0
 public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService,
                          IProductService productService, ITaxClassService taxClassService, ISettingService settingService) : base(db)
 {
     this.productFinder   = productFinder;
     this.deleterService  = deleterService;
     this.productService  = productService;
     this.taxClassService = taxClassService;
     this.settingService  = settingService;
 }
Beispiel #6
0
 public ProductService(DataContext db, IProductFinder productFinder, ICategoryService categoryService,
     IProductSkuService productSkuService, ICacheService cacheService)
 {
     this.db = db;
     this.productFinder = productFinder;
     this.categoryService = categoryService;
     this.productSkuService = productSkuService;
     this.cacheService = cacheService;
 }
Beispiel #7
0
        public DataExportService()
        {
            // Not using structuremap as dependencies are being disposed too early

            db = DataContext.Create();
            categoryService    = new CategoryService(db, null, new CacheService());
            productFinder      = new ProductFinder(db, categoryService);
            workProcessService = new WorkProcessService(db);
        }
Beispiel #8
0
 public ProductService(DataContext db, IProductFinder productFinder, ICategoryService categoryService,
                       IProductSkuService productSkuService, ICacheService cacheService)
 {
     this.db                = db;
     this.productFinder     = productFinder;
     this.categoryService   = categoryService;
     this.productSkuService = productSkuService;
     this.cacheService      = cacheService;
 }
Beispiel #9
0
        public void FindProduct_ReturnsNothing()
        {
            IProductFinder productFinder = BuildEmptyInventory();

            // Act
            var result = productFinder.FindProduct("barcodeDoesntExist");

            result.Should().BeNull();
        }
        public DataExportService()
        {
            // Not using structuremap as dependencies are being disposed too early

            db = DataContext.Create();
            categoryService = new CategoryService(db, null, new CacheService());
            productFinder = new ProductFinder(db, categoryService);
            workProcessService = new WorkProcessService(db);
        }
 public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService,
     IProductService productService, ITaxClassService taxClassService, ISettingService settingService)
     : base(db)
 {
     this.productFinder = productFinder;
     this.deleterService = deleterService;
     this.productService = productService;
     this.taxClassService = taxClassService;
     this.settingService = settingService;
 }
Beispiel #12
0
        public void FindProduct_ReturnsStuff()
        {
            Product        prod          = new Product("existingBarcode", 10);
            IProductFinder productFinder = BuildInventoryWith(prod);

            // Act
            var result = productFinder.FindProduct("existingBarcode");

            result.Should().Be(prod);
        }
Beispiel #13
0
 public OrderController(DataContext db, ICustomerService customerService, IProductFinder productFinder,
                        IShippingService shippingService, ITaxService taxService, ISettingService settingService,
                        IOrderService orderService, IOptionService optionService) : base(db)
 {
     this.customerService = customerService;
     this.productFinder   = productFinder;
     this.shippingService = shippingService;
     this.taxService      = taxService;
     this.settingService  = settingService;
     this.orderService    = orderService;
     this.optionService   = optionService;
 }
Beispiel #14
0
 public OrderController(DataContext db, ICustomerService customerService, IProductFinder productFinder,
     IShippingService shippingService, ITaxService taxService, ISettingService settingService,
     IOrderService orderService, IOptionService optionService)
     : base(db)
 {
     this.customerService = customerService;
     this.productFinder = productFinder;
     this.shippingService = shippingService;
     this.taxService = taxService;
     this.settingService = settingService;
     this.orderService = orderService;
     this.optionService = optionService;
 }
Beispiel #15
0
 public CashRegister(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }
Beispiel #16
0
 public ProductService(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }
Beispiel #17
0
 public App(IConfiguration configuration, IProductFinder productFinder)
 {
     Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     ProductFinder = productFinder ?? throw new ArgumentNullException(nameof(productFinder));
 }
Beispiel #18
0
 public ProductService(IUnitOfWork unitOfWork, IRepository <Product> repository, IProductFinder finder)
 {
     _unitOfWork = unitOfWork;
     _repository = repository;
     _finder     = finder;
 }
 public ProductController(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }