public ShoppingCartItemsController(IShoppingCartItemApiService shoppingCartItemApiService, 
     IJsonFieldsSerializer jsonFieldsSerializer, 
     IAclService aclService, 
     ICustomerService customerService, 
     IStoreMappingService storeMappingService,
     IStoreService storeService,
     IDiscountService discountService,
     ICustomerActivityService customerActivityService,
     ILocalizationService localizationService, 
     IShoppingCartService shoppingCartService, 
     IProductService productService, 
     IFactory<ShoppingCartItem> factory)
     :base(jsonFieldsSerializer, 
          aclService, 
          customerService, 
          storeMappingService, 
          storeService, 
          discountService,
          customerActivityService,
          localizationService)
 {
     _shoppingCartItemApiService = shoppingCartItemApiService;
     _shoppingCartService = shoppingCartService;
     _productService = productService;
     _factory = factory;
 }
Exemplo n.º 2
0
 public ShoppingCartItemsController(IShoppingCartItemApiService shoppingCartItemApiService,
                                    IJsonFieldsSerializer jsonFieldsSerializer,
                                    IAclService aclService,
                                    ICustomerService customerService,
                                    IStoreMappingService storeMappingService,
                                    IStoreService storeService,
                                    IDiscountService discountService,
                                    ICustomerActivityService customerActivityService,
                                    ILocalizationService localizationService,
                                    IShoppingCartService shoppingCartService,
                                    IProductService productService,
                                    IFactory <ShoppingCartItem> factory,
                                    IPictureService pictureService,
                                    IProductAttributeConverter productAttributeConverter,
                                    IDTOHelper dtoHelper,
                                    IStoreContext storeContext)
     : base(jsonFieldsSerializer,
            aclService,
            customerService,
            storeMappingService,
            storeService,
            discountService,
            customerActivityService,
            localizationService,
            pictureService)
 {
     _shoppingCartItemApiService = shoppingCartItemApiService;
     _shoppingCartService        = shoppingCartService;
     _productService             = productService;
     _factory = factory;
     _productAttributeConverter = productAttributeConverter;
     _dtoHelper    = dtoHelper;
     _storeContext = storeContext;
 }
        public void Setup()
        {
            _existigShoppingCartItems = new List <ShoppingCartItem>();

            for (int i = 1; i <= 1000; i++)
            {
                _existigShoppingCartItems.Add(new ShoppingCartItem()
                {
                    Id = i
                });
            }

            var shoppingCartItemRepo = MockRepository.GenerateStub <IRepository <ShoppingCartItem> >();

            shoppingCartItemRepo.Stub(x => x.TableNoTracking).Return(_existigShoppingCartItems.AsQueryable());

            var storeContext = MockRepository.GenerateStub <IStoreContext>();

            storeContext.Stub(x => x.CurrentStore).Return(new Store()
            {
                Id = 0
            });

            _shoppingCartItemApiService = new ShoppingCartItemApiService(shoppingCartItemRepo, storeContext);
        }
Exemplo n.º 4
0
        public void Setup()
        {
            _baseDate = new DateTime(2016, 2, 23);

            _existigShoppingCartItems = new List <ShoppingCartItem>();
            var randomNumber = new Random();

            for (int i = 1; i <= 1000; i++)
            {
                _existigShoppingCartItems.Add(new ShoppingCartItem()
                {
                    Id           = i,
                    UpdatedOnUtc = _baseDate.AddMonths(randomNumber.Next(1, 10))
                });
            }

            var shoppingCartItemsRepo = MockRepository.GenerateStub <IRepository <ShoppingCartItem> >();

            shoppingCartItemsRepo.Stub(x => x.TableNoTracking).Return(_existigShoppingCartItems.AsQueryable());

            var storeContext = MockRepository.GenerateStub <IStoreContext>();

            storeContext.Stub(x => x.CurrentStore).Return(new Store()
            {
                Id = 0
            });

            _shoppingCartItemsApiService = new ShoppingCartItemApiService(shoppingCartItemsRepo, storeContext);
        }
        public void Setup()
        {
            var randomNumber = new Random();

            _shoppingCartItems = new List <ShoppingCartItem>();

            for (int i = 1; i <= 1000; i++)
            {
                _shoppingCartItems.Add(new ShoppingCartItem()
                {
                    Id         = i,
                    CustomerId = randomNumber.Next(1, 10)
                });
            }

            var shoppingCartItemsRepo = MockRepository.GenerateStub <IRepository <ShoppingCartItem> >();

            shoppingCartItemsRepo.Stub(x => x.TableNoTracking).Return(_shoppingCartItems.AsQueryable());

            var storeContext = MockRepository.GenerateStub <IStoreContext>();

            storeContext.Stub(x => x.CurrentStore).Return(new Store()
            {
                Id = 0
            });

            _shoppingCartItemApiService = new ShoppingCartItemApiService(shoppingCartItemsRepo, storeContext);
        }