public void SetUp() { DomainEvent.TurnOff(); MockRepository.GenerateStub<IRepository<Size>>(); sizeService = new SizeService(); }
public void SetUp() { DomainEvent.TurnOff(); MockRepository.GenerateStub <IRepository <Size> >(); sizeService = new SizeService(); }
public SizeFacade(ISizeService sizeService, ISizeTranslationService sizeTranslationService, IRestaurantService restaurantService, IItemSizeService itemSizeService, IUnitOfWorkAsync unitOfWork) : base(unitOfWork) { _sizeTranslationService = sizeTranslationService; _sizeService = sizeService; _restaurantService = restaurantService; _itemSizeService = itemSizeService; }
public ProductController() { _productService = new ProductService(new ProductRepository(new oecsEntities())); _productDetailService = new ProductDetailService(new ProductDetailRepository(new oecsEntities())); _productGalleryService = new ProductGalleryService(new ProductGalleryRepository(new oecsEntities())); _sizeService = new SizeService(new SizeRepository(new oecsEntities())); }
public void Setup() { products= new List<Product>(); images = new List<Image>(); validator = MockRepository.GenerateStub<IValidatingBinder>(); repository = MockRepository.GenerateStub<IRepository<Product>>(); repository.Expect(x => x.GetAll()).Return(products.AsQueryable()); fileService = MockRepository.GenerateStub<IHttpFileService>(); imageOrderableService = MockRepository.GenerateStub<IOrderableService<ProductImage>>(); fileService.Expect(x => x.GetUploadedImages(null)).IgnoreArguments().Return(images); sizeService = MockRepository.GenerateStub<ISizeService>(); var resolver = MockRepository.GenerateStub<IRepositoryResolver>(); controllerContext = new ControllerContext() { HttpContext = MockRepository.GenerateStub<HttpContextBase>() }; controllerContext.HttpContext.Stub(x => x.Request).Return(MockRepository.GenerateStub<HttpRequestBase>()); sizeService.Expect(x => x.WithValues(controllerContext.HttpContext.Request.Form)).Return(sizeService); valueProvider = new FakeValueProvider(); bindingContext = new ModelBindingContext() { ModelState = new ModelStateDictionary(), ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(null, typeof(Product)), ModelName = "product", ValueProvider = valueProvider }; binder = new ProductBinder(validator, resolver, repository, fileService, imageOrderableService, sizeService); }
public ProductController(IProductService productService, ISizeService sizeService, ITypeService typeService, IOriginService originService, IModelService modelService) { _productService = productService; _sizeService = sizeService; _typeService = typeService; _originService = originService; _modelService = modelService; }
public ProductBinder(IValidatingBinder validatingBinder, IRepositoryResolver resolver, IRepository<Product> repository, IHttpFileService httpFileService, IOrderableService<ProductImage> orderableService, ISizeService sizeService) : base(validatingBinder, resolver) { this.repository = repository; this.httpFileService = httpFileService; this.orderableService = orderableService; this.sizeService = sizeService; }
public ProductDetailService(IProductDetailRepository productDetailRepository) { _productDetailRepository = productDetailRepository; _productGalleryRepository = new ProductGalleryRepository(new oecsEntities()); _colorService = new ColorService(new ColorRepository(new oecsEntities())); _sizeService = new SizeService(new SizeRepository(new oecsEntities())); }
public ProductController(IProductService productService, ICategoryService categoryService, ISizeService sizeService, IColorService colorService, ISupplierService supplierService) { _productService = productService; _categoryService = categoryService; _sizeService = sizeService; _colorService = colorService; _supplierService = supplierService; }
public HomeController(IPizzaSizeService pizzaSizeService, IToppingService toppingService, ISizeService sizeService, IUserSessionService userSessionService) { _pizzaSizeService = pizzaSizeService; _toppingService = toppingService; _sizeService = sizeService; _userSessionService = userSessionService; }
public searchApi(IServiceFactory servicefactory, ILogger <searchApi> logger) { // Factory pattern Get the instances from the factory for the E-commerce Shoes filtering options. _brandService = servicefactory.GetServiceInstance <IBrandService>(); _categoryService = servicefactory.GetServiceInstance <ICategoryService>(); _sizeService = servicefactory.GetServiceInstance <ISizeService>(); _colorService = servicefactory.GetServiceInstance <IColorService>(); _personService = servicefactory.GetServiceInstance <IPersonService>(); }
public SizesAdminPresenter(ISizesAdminView view, ISizeService sizeService) : base(view) { this.sizeService = sizeService; this.View.OnSizesGetData += this.View_OnSizesGetData; this.View.OnSizeDelite += this.View_OnSizesDelete; this.View.OnSizeEdit += this.View_OnSizesEdit; this.View.OnSizeCreate += this.View_OnSizesCreate; }
public ProductController(IRepository<Product> productRepository, IRepository<Category> categoryRepository, ISizeService sizeService, IOrderableService<Product> productOrderableService, IUserService userService, IUnitOfWorkManager uow) { this.productRepository = productRepository; this.uow = uow; this.userService = userService; this.categoryRepository = categoryRepository; this.sizeService = sizeService; this.productOrderableService = productOrderableService; }
public ProductService(IProductRepository productRepository) { _productRepository = productRepository; _colorService = new ColorService(new ColorRepository(new oecsEntities())); _sizeService = new SizeService(new SizeRepository(new oecsEntities())); _brandService = new BrandService(new BrandRepository(new oecsEntities())); _categoryService = new CategoryService(new CategoryRepository(new oecsEntities())); }
public FirmaController(IProductService productService, ISupplierService supplierService, IColorService colorService, ISizeService sizeService, ICategoryService categoryService, IOrderDetailService orderDetailService) { _productService = productService; _supplierService = supplierService; _categoryService = categoryService; _colorService = colorService; _sizeService = sizeService; _orderDetailService = orderDetailService; }
public RedistFileService(IApplicationSettings applicationSettings, IDirectoryService directoryService, ISizeService sizeService) { _directoryService = directoryService; _sizeService = sizeService; const RegexOptions regexOptions = RegexOptions.IgnoreCase | RegexOptions.Compiled; _redistFolders = applicationSettings.RedistFolders.ToDictionary(x => new Regex(x.Key, regexOptions), y => y.Value); _redistFiles = applicationSettings.RedistFiles.ToDictionary(x => new Regex(x.Key, regexOptions), y => y.Value); }
public ProductController(IProductService productService, ICategoryService categoryService, ISuppelierService suppelierService, IProductDetailService productDetailService, IColorService colorService, ISizeService sizeService, IDiscountCodeService discountCodeService) { this.productService = productService; this.categoryService = categoryService; this.suppelierService = suppelierService; this.productDetailService = productDetailService; this.colorService = colorService; this.sizeService = sizeService; this.discountCodeService = discountCodeService; }
public ProductController(IProductService productService, IConfiguration configuration, IBillService billService, IProductCategoryService productCategoryService, ISizeService sizeService, IColorService colorService) { _productService = productService; _productCategoryService = productCategoryService; _sizeService = sizeService; _colorService = colorService; _configuration = configuration; _billService = billService; }
public ProductController(IProductService productService, IProductCategoryService productCategoryService, IColorService colorService, ISizeService sizeService, IPriceService priceService) { this._productService = productService; this._productCategoryService = productCategoryService; this._colorService = colorService; this._sizeService = sizeService; this._priceService = priceService; }
public Seeder(IServiceFactory servicefactory, DataContext context) { _brandService = servicefactory.GetServiceInstance <IBrandService>(); _categoryService = servicefactory.GetServiceInstance <ICategoryService>(); _sizeService = servicefactory.GetServiceInstance <ISizeService>(); _colorService = servicefactory.GetServiceInstance <IColorService>(); _personService = servicefactory.GetServiceInstance <IPersonService>(); _productService = servicefactory.GetServiceInstance <IProductService>(); _productVariantService = servicefactory.GetServiceInstance <IProductVariantService>(); _context = context; }
//private string merchantId = ConfigHelper.GetByKey("MerchantId"); //private string merchantPassword = ConfigHelper.GetByKey("MerchantPassword"); //private string merchantEmail = ConfigHelper.GetByKey("MerchantEmail"); public CartController(IProductService productService, IBillService billService, IViewRenderService viewRenderService, IEmailSender emailSender, IConfiguration configuration, IColorService color, ISizeService size, IHubContext <OnlineShopHub> hubContext, IProductQuantityService quantityService) { _productService = productService; _billService = billService; _viewRenderService = viewRenderService; _emailSender = emailSender; _configuration = configuration; _color = color; _size = size; _hubContext = hubContext; _quantityService = quantityService; }
public ProductsController( IProductService productService, IColorService colorService, ISizeService sizeService, AppDbContext context, IMapper mapper) { _productService = productService; _colorService = colorService; _sizeService = sizeService; _context = context; _mapper = mapper; }
public ProductDetailViewModel(IRegionChangeManager regionChangeManager, IEventAggregator eventAggregator, IProductDetailService productDetailService, ISizeService sizeService) { _regionChangeManager = regionChangeManager; _eventAggregator = eventAggregator; _productDetailService = productDetailService; _sizeService = sizeService; AddProductToCartCommand = new DelegateCommand(OnAddProductToCartCommandExecute); BackToOverViewCommand = new DelegateCommand(OnBackToOverviewCommandExecute); InitializeCommand = new DelegateCommand(OnInitializeCommandExecute, OnInitializeCommandCanExecute); Sizes = new List <SizeModel>(); }
public CartController(IProductService productService, IBillService billService, IColorService colorService, ISizeService sizeService, IUserService userService, ITagService tagService, IHostingEnvironment hostingEnvironment, IEmailSender emailSender) { this._productService = productService; this._billService = billService; this._colorService = colorService; this._sizeService = sizeService; this._userService = userService; this._tagService = tagService; this._hostingEnvironment = hostingEnvironment; this._emailSender = emailSender; }
public ProductController(IProductService productService, IProductCategoryService productCategoryService, IConfiguration configuration, ISizeService sizeService, IColorService colorService, ITagService tagService, IBlogService blogService, IAdvertisementService advertisementService, UserManager <AppUser> userManager) { this._productCategoryService = productCategoryService; this._advertisementService = advertisementService; this._productService = productService; this._configuration = configuration; this._colorService = colorService; this._sizeService = sizeService; this._tagService = tagService; this._blogService = blogService; this._userManager = userManager; }
public HomeController(IProductService productService, IBlogService blogService, IProductCategoryService productCategoryService, ISlideService slideService, IFeedbackService feedbackService, ISizeService sizeService, IMemoryCache cache, IAdvertisementService advertisementService) { this._productService = productService; this._blogService = blogService; this._productCategoryService = productCategoryService; this._advertisementService = advertisementService; this._slideService = slideService; this._feedbackService = feedbackService; this._sizeService = sizeService; this._cache = cache; }
public SizeController(ISizeService SizeService, IUnitOfWork unitOfWork, IExceptionHandlingService exec) { _SizeService = SizeService; _unitOfWork = unitOfWork; _exception = exec; UserRoles = (List <string>)System.Web.HttpContext.Current.Session["Roles"]; //Log Initialization LogVm.SessionId = 0; LogVm.ControllerName = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("controller"); LogVm.ActionName = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("action"); LogVm.User = System.Web.HttpContext.Current.Request.RequestContext.HttpContext.User.Identity.Name; }
public ProductController(IProductService productService, IProductCategoryService productCategoryService, IColorService colorService, ISizeService sizeService, IHostingEnvironment hostingEnvironment, IViewRenderService viewRenderService) { _productService = productService; _productCategoryService = productCategoryService; _colorService = colorService; _sizeService = sizeService; _hostingEnvironment = hostingEnvironment; _viewRenderService = viewRenderService; }
public ShoppingCartController(IOrderService orderService, IProductService productService, ApplicationUserManager userManager, IColorService colorService, ISizeService sizeService, IPriceService priceService) { this._productService = productService; this._userManager = userManager; this._orderService = orderService; this._priceService = priceService; this._colorService = colorService; this._sizeService = sizeService; }
private MainViewModel(ISteamFolderService steamFolderService, ISizeService sizeService) { _steamFolderService = steamFolderService; _sizeService = sizeService; FindSteamFolder = new DelegateCommand(FindSteamFolderExecute, CanFindSteamFolder); AddFolder = new DelegateCommand(AddFolderExecute, CanAddFolder); RemoveFolder = new DelegateCommand(RemoveFolderExecute, CanRemoveFolder); Search = new DelegateCommand(SearchExecute, CanSearch); DeletePackages = new DelegateCommand(DeletePackagesExecute, CanDeletePackages); CanUseControls = true; FoldersToSearch = new ObservableCollection <string>(); FoldersToDelete = new ObservableCollection <RedistItem>(); }
public BillController( IBillService billService, IHostingEnvironment hostingEnvironment, IViewRenderService viewRenderService, IProductService productService, IColorService colorService, ISizeService sizeService ) { _billService = billService; _hostingEnvironment = hostingEnvironment; _viewRenderService = viewRenderService; _productService = productService; _colorService = colorService; _sizeService = sizeService; }
public CartController( IProductService productService, IColorService colorService, ISizeService sizeService, IBillService billService, IViewRenderService viewRenderService, IConfiguration configuration, IEmailSender emailSender) { _productService = productService; _colorService = colorService; _sizeService = sizeService; _viewRenderService = viewRenderService; _configuration = configuration; _emailSender = emailSender; _billService = billService; }
public ProductsController ( IProductService productService, ITypeService typeService, ISubtypeService subtypeService, ISizeService sizeService, ITradeMarkService tradeMarkService, IMapper automapper ) { _productService = productService; _typeService = typeService; _subtypeService = subtypeService; _sizeService = sizeService; _tradeMarkService = tradeMarkService; _automapper = automapper; }
public ShoppingCartController( IProductService productService, IOrderService orderService, IOrderDetailsService orderDetailsService, IContactInfoService contactInfoService, IUserService userService, ISizeService sizeService) { Guard.WhenArgument(productService, "productService").IsNull().Throw(); Guard.WhenArgument(orderService, "orderService").IsNull().Throw(); Guard.WhenArgument(orderDetailsService, "orderDetailsService").IsNull().Throw(); Guard.WhenArgument(contactInfoService, "contactInfoService").IsNull().Throw(); Guard.WhenArgument(userService, nameof(userService)).IsNull().Throw(); Guard.WhenArgument(sizeService, nameof(sizeService)).IsNull().Throw(); this.productService = productService; this.orderService = orderService; this.orderDetailsService = orderDetailsService; this.contactInfoService = contactInfoService; this.userService = userService; this.sizeService = sizeService; }
public void SetUp() { // you have to be an administrator to access the product controller Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("admin"), new[] { "Administrator" }); categoryRepository = MockRepositoryBuilder.CreateCategoryRepository(); productRepository = MockRepositoryBuilder.CreateProductRepository(); MockRepository.GenerateStub<IRepository<ProductImage>>(); MockRepository.GenerateStub<IHttpFileService>(); sizeService = MockRepository.GenerateStub<ISizeService>(); productOrderableService = MockRepository.GenerateStub<IOrderableService<Product>>(); MockRepository.GenerateStub<IOrderableService<ProductImage>>(); userService = MockRepository.GenerateStub<IUserService>(); productController = new ProductController(productRepository, categoryRepository, sizeService, productOrderableService, userService, MockRepository.GenerateStub<IUnitOfWorkManager>()); userService.Expect(c => c.CurrentUser).Return(new User { RoleId = Role.AdministratorId }); }
public ProductController(IErrorService errorService, IProductService productService, IProductMaterialService productMaterialService, IMaterialService materialService, IProductColorService productColorService, IColorService colorService, IProductSizeService productSizeService, ISizeService sizeService, IProductHeightService productHeightService, IHeightService heightService, IProductTypeService productTypeService, ITypeService typeService, IProductHeelService productHeelService, IHeelService heelService) : base(errorService) { this._productHeelService = productHeelService; this._heelService = heelService; this._productTypeService = productTypeService; this._typeService = typeService; this._productHeightService = productHeightService; this._heightService = heightService; this._productSizeService = productSizeService; this._sizeService = sizeService; this._productService = productService; this._materialService = materialService; this._productColorService = productColorService; this._colorService = colorService; this._productMaterialService = productMaterialService; }
public SizeController(ISizeService sizeService) { _sizeService = sizeService; }