Ejemplo n.º 1
0
 public OrderItemsController(
     IJsonFieldsSerializer jsonFieldsSerializer,
     IAclService aclService,
     ICustomerService customerService,
     IStoreMappingService storeMappingService,
     IStoreService storeService,
     IDiscountService discountService,
     ICustomerActivityService customerActivityService,
     ILocalizationService localizationService,
     IOrderItemApiService orderItemApiService,
     IOrderApiService orderApiService,
     IOrderService orderService,
     IProductApiService productApiService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     IPictureService pictureService, IDTOHelper dtoHelper)
     : base(jsonFieldsSerializer,
            aclService,
            customerService,
            storeMappingService,
            storeService,
            discountService,
            customerActivityService,
            localizationService,
            pictureService)
 {
     _orderItemApiService     = orderItemApiService;
     _orderApiService         = orderApiService;
     _orderService            = orderService;
     _productApiService       = productApiService;
     _priceCalculationService = priceCalculationService;
     _taxService = taxService;
     _dtoHelper  = dtoHelper;
 }
Ejemplo n.º 2
0
        public JobSchedulerOrderController(IOrderApiService orderApiService,

                                           IAclService aclService,
                                           ICustomerService customerService,
                                           IStoreMappingService storeMappingService,
                                           IStoreService storeService,
                                           IDiscountService discountService,
                                           ICustomerActivityService customerActivityService,
                                           ILocalizationService localizationService,
                                           IProductService productService,
                                           IFactory <Core.Domain.Orders.Order> factory,
                                           IOrderProcessingService orderProcessingService,
                                           IOrderService orderService,
                                           IShoppingCartService shoppingCartService,
                                           IGenericAttributeService genericAttributeService,
                                           IStoreContext storeContext,
                                           IShippingService shippingService)

        {
            _orderApiService         = orderApiService;
            _factory                 = factory;
            _orderProcessingService  = orderProcessingService;
            _orderService            = orderService;
            _shoppingCartService     = shoppingCartService;
            _genericAttributeService = genericAttributeService;
            _storeContext            = storeContext;
            _shippingService         = shippingService;
            _productService          = productService;
            _customerService         = customerService;
        }
 public OrdersController(IOrderApiService orderApiService,
                         IJsonFieldsSerializer jsonFieldsSerializer,
                         IAclService aclService,
                         ICustomerService customerService,
                         IStoreMappingService storeMappingService,
                         IStoreService storeService,
                         IDiscountService discountService,
                         ICustomerActivityService customerActivityService,
                         ILocalizationService localizationService,
                         IProductService productService,
                         IFactory <Order> factory,
                         IOrderProcessingService orderProcessingService,
                         IOrderService orderService,
                         IShoppingCartService shoppingCartService,
                         IGenericAttributeService genericAttributeService,
                         IStoreContext storeContext,
                         IShippingService shippingService,
                         IPictureService pictureService,
                         IDTOHelper dtoHelper)
     : base(jsonFieldsSerializer, aclService, customerService, storeMappingService,
            storeService, discountService, customerActivityService, localizationService, pictureService)
 {
     _orderApiService         = orderApiService;
     _factory                 = factory;
     _orderProcessingService  = orderProcessingService;
     _orderService            = orderService;
     _shoppingCartService     = shoppingCartService;
     _genericAttributeService = genericAttributeService;
     _storeContext            = storeContext;
     _shippingService         = shippingService;
     _dtoHelper               = dtoHelper;
     _productService          = productService;
 }
Ejemplo n.º 4
0
        public void Setup()
        {
            _baseDate = new DateTime(2016, 2, 23);

            _existigOrders = new List <Order>()
            {
                new Order()
                {
                    Id = 2, CreatedOnUtc = _baseDate.AddMonths(2)
                },
                new Order()
                {
                    Id = 3, CreatedOnUtc = _baseDate.AddMonths(10)
                },
                new Order()
                {
                    Id = 1, CreatedOnUtc = _baseDate.AddMonths(7)
                },
                new Order()
                {
                    Id = 4, CreatedOnUtc = _baseDate
                },
                new Order()
                {
                    Id = 5, CreatedOnUtc = _baseDate.AddMonths(3)
                },
                new Order()
                {
                    Id = 6, Deleted = true, CreatedOnUtc = _baseDate.AddMonths(10)
                },
                new Order()
                {
                    Id = 7, CreatedOnUtc = _baseDate.AddMonths(4)
                }
            };

            var orderRepo = MockRepository.GenerateStub <IRepository <Order> >();

            orderRepo.Stub(x => x.TableNoTracking).Return(_existigOrders.AsQueryable());

            _orderApiService = new OrderApiService(orderRepo);
        }
        public void Setup()
        {
            _existigOrders = new List <Order>();

            for (int i = 0; i < 1000; i++)
            {
                _existigOrders.Add(new Order()
                {
                    Id = i + 1
                });
            }

            _existigOrders[5].Deleted = true;

            var orderRepo = MockRepository.GenerateStub <IRepository <Order> >();

            orderRepo.Stub(x => x.TableNoTracking).Return(_existigOrders.AsQueryable());

            _orderApiService = new OrderApiService(orderRepo);
        }
        public void Setup()
        {
            _existigOrders = new List <Order>()
            {
                new Order()
                {
                    Id = 2, CustomerId = 1
                },
                new Order()
                {
                    Id = 3, CustomerId = 1
                },
                new Order()
                {
                    Id = 1, CustomerId = 2
                },
                new Order()
                {
                    Id = 4, CustomerId = 1
                },
                new Order()
                {
                    Id = 5, CustomerId = 2
                },
                new Order()
                {
                    Id = 6, CustomerId = 1, Deleted = true
                },
                new Order()
                {
                    Id = 7, CustomerId = 2
                }
            };

            var productRepo = MockRepository.GenerateStub <IRepository <Order> >();

            productRepo.Stub(x => x.TableNoTracking).Return(_existigOrders.AsQueryable());

            _orderApiService = new OrderApiService(productRepo);
        }
Ejemplo n.º 7
0
        public void Setup()
        {
            _existigOrders = new List <Order>()
            {
                new Order()
                {
                    Id = 2, OrderStatus = OrderStatus.Complete
                },
                new Order()
                {
                    Id = 3, PaymentStatus = PaymentStatus.Paid
                },
                new Order()
                {
                    Id = 1, ShippingStatus = ShippingStatus.Delivered
                },
                new Order()
                {
                    Id = 4, OrderStatus = OrderStatus.Cancelled, PaymentStatus = PaymentStatus.Pending
                },
                new Order()
                {
                    Id = 5, ShippingStatus = ShippingStatus.NotYetShipped, PaymentStatus = PaymentStatus.Paid
                },
                new Order()
                {
                    Id = 6, OrderStatus = OrderStatus.Complete, ShippingStatus = ShippingStatus.ShippingNotRequired
                },
                new Order()
                {
                    Id = 7, OrderStatus = OrderStatus.Cancelled, PaymentStatus = PaymentStatus.Refunded, ShippingStatus = ShippingStatus.NotYetShipped
                }
            };

            var orderRepo = MockRepository.GenerateStub <IRepository <Order> >();

            orderRepo.Stub(x => x.TableNoTracking).Return(_existigOrders.AsQueryable());

            _orderApiService = new OrderApiService(orderRepo);
        }
Ejemplo n.º 8
0
        public void Setup()
        {
            _existigOrders = new List <Order>()
            {
                new Order()
                {
                    Id = 2
                },
                new Order()
                {
                    Id = 3
                },
                new Order()
                {
                    Id = 1
                },
                new Order()
                {
                    Id = 4
                },
                new Order()
                {
                    Id = 5
                },
                new Order()
                {
                    Id = 6, Deleted = true
                },
                new Order()
                {
                    Id = 7
                }
            };

            var orderRepo = MockRepository.GenerateStub <IRepository <Order> >();

            orderRepo.Stub(x => x.TableNoTracking).Return(_existigOrders.AsQueryable());

            _orderApiService = new OrderApiService(orderRepo);
        }
Ejemplo n.º 9
0
        //public OrdersController() : this(new DefaultOrderService()) { }

        public OrdersController(IOrderApiService service)
        {
            _service = service;
        }
Ejemplo n.º 10
0
 public OrderApiController(IOrderApiService apiService)
 {
     _apiService = apiService;
 }
Ejemplo n.º 11
0
 public OrderController(IOrderApiService orderApiService, IOrderDetailApiService orderDetailApiService)
 {
     _orderApiService       = orderApiService;
     _orderDetailApiService = orderDetailApiService;
 }
Ejemplo n.º 12
0
 public OrderApiController(IOrderApiService apiService)
 {
     _apiService = apiService;
 }