public UmbracoApplicationCacheManagingService(IProductService productService, IProductVariantService productVariantService, IProductVariantGroupService productVariantGroupService, ICategoryService categoryService, 
			IOrderDiscountService orderDiscountService, IProductDiscountService productDiscountService,
			IProductRepository productRepository, ICategoryRepository categoryRepository, IProductVariantGroupRepository productVariantGroupRepository, IProductVariantRepository productVariantRepository,
			IStoreService storeService, IApplicationCacheService applicationCacheService)
		{
			_productService = productService;
			_productVariantService = productVariantService;
			_productVariantGroupService = productVariantGroupService;
			_categoryService = categoryService;
			_orderDiscountService = orderDiscountService;
			_productDiscountService = productDiscountService;
			_productRepository = productRepository;
			_categoryRepository = categoryRepository;
			_productVariantGroupRepository = productVariantGroupRepository;
			_productVariantRepository = productVariantRepository;
			_storeService = storeService;
			_applicationCacheService = applicationCacheService;

			_manageUmbracoXMLCacheWhenLoadBalanced = System.Web.Configuration.WebConfigurationManager.
				AppSettings["uWebshopLoadBalancedNoUmbraco"] != "true";
		}
        public void Setup()
        {
            IOC.UnitTest();
            IOC.OrderService.Mock(out _mockOrderService);
            _mockOrderService.Setup(m => m.OrderContainsItem(It.IsAny <OrderInfo>(), It.IsAny <List <int> >())).Returns(true);

            IOC.DiscountService.Actual();
            IOC.OrderDiscountService.Actual();
            IOC.DiscountCalculationService.SetupNewMock().Setup(m => m.DiscountAmountForOrder(It.IsAny <IOrderDiscount>(), It.IsAny <OrderInfo>(), It.IsAny <bool>())).Returns(1);

            _orderInfo = DefaultFactoriesAndSharedFunctionality.CreateOrderInfo(DefaultFactoriesAndSharedFunctionality.CreateProductInfo(1000, 1));

            _mockDiscount = new Mock <IOrderDiscount>();
            _mockDiscount.SetupGet(m => m.CounterEnabled).Returns(false);
            _mockDiscount.SetupGet(m => m.RequiredItemIds).Returns(new List <int>());

            // todo: fix
            //IOC.OrderDiscountRepository.SetupFake(_mockDiscount.Object);

            _discountService = IOC.OrderDiscountService.Actual().Resolve();
        }
        public UmbracoApplicationCacheManagingService(IProductService productService, IProductVariantService productVariantService, IProductVariantGroupService productVariantGroupService, ICategoryService categoryService,
                                                      IOrderDiscountService orderDiscountService, IProductDiscountService productDiscountService,
                                                      IProductRepository productRepository, ICategoryRepository categoryRepository, IProductVariantGroupRepository productVariantGroupRepository, IProductVariantRepository productVariantRepository,
                                                      IStoreService storeService, IApplicationCacheService applicationCacheService)
        {
            _productService                = productService;
            _productVariantService         = productVariantService;
            _productVariantGroupService    = productVariantGroupService;
            _categoryService               = categoryService;
            _orderDiscountService          = orderDiscountService;
            _productDiscountService        = productDiscountService;
            _productRepository             = productRepository;
            _categoryRepository            = categoryRepository;
            _productVariantGroupRepository = productVariantGroupRepository;
            _productVariantRepository      = productVariantRepository;
            _storeService            = storeService;
            _applicationCacheService = applicationCacheService;

            _manageUmbracoXMLCacheWhenLoadBalanced = System.Web.Configuration.WebConfigurationManager.
                                                     AppSettings["uWebshopLoadBalancedNoUmbraco"] != "true";
        }
예제 #4
0
 public DiscountService(IOrderDiscountService orderDiscountService, IProductDiscountService productDiscountService)
 {
     _orderDiscountService   = orderDiscountService;
     _productDiscountService = productDiscountService;
 }
예제 #5
0
 public OrderController(ICashRegisterDataService iCashRegisterDataService, IOrderDiscountService orderDiscountService)
 {
     _ICashRegisterDataService = iCashRegisterDataService;
     _OrderDiscountService     = orderDiscountService;
 }
예제 #6
0
		public DiscountService(IOrderDiscountService orderDiscountService, IProductDiscountService productDiscountService)
		{
			_orderDiscountService = orderDiscountService;
			_productDiscountService = productDiscountService;
		}