예제 #1
0
 public CommonController(IPaymentService paymentService, 
     IShippingService shippingService,
     IShoppingCartService shoppingCartService, 
     ICurrencyService currencyService, 
     IMeasureService measureService,
     ICustomerService customerService, 
     IUrlRecordService urlRecordService, 
     IWebHelper webHelper, 
     CurrencySettings currencySettings,
     MeasureSettings measureSettings, 
     IDateTimeHelper dateTimeHelper,
     ILanguageService languageService, 
     IWorkContext workContext,
     IStoreContext storeContext,
     IPermissionService permissionService, 
     ILocalizationService localizationService)
 {
     this._paymentService = paymentService;
     this._shippingService = shippingService;
     this._shoppingCartService = shoppingCartService;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._measureSettings = measureSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._languageService = languageService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._permissionService = permissionService;
     this._localizationService = localizationService;
 }
예제 #2
0
 public WebWorkContext(HttpContextBase httpContext,
     ICustomerService customerService,
     IVendorService vendorService,
     IStoreContext storeContext,
     IAuthenticationService authenticationService,
     ILanguageService languageService,
     ICurrencyService currencyService,
     IGenericAttributeService genericAttributeService,
     TaxSettings taxSettings, CurrencySettings currencySettings,
     LocalizationSettings localizationSettings,
     IWebHelper webHelper)
 {
     this._httpContext = httpContext;
     this._customerService = customerService;
     this._vendorService = vendorService;
     this._storeContext = storeContext;
     this._authenticationService = authenticationService;
     this._languageService = languageService;
     this._currencyService = currencyService;
     this._genericAttributeService = genericAttributeService;
     this._taxSettings = taxSettings;
     this._currencySettings = currencySettings;
     this._localizationSettings = localizationSettings;
     this._webHelper = webHelper;
 }
예제 #3
0
 public FroogleService(IGoogleService googleService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._googleService = googleService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
예제 #4
0
 public UpdateExchangeRateTask(ICurrencyService currencyService, 
     ISettingService settingService, CurrencySettings currencySettings)
 {
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._currencySettings = currencySettings;
 }
예제 #5
0
 public PriceFormatter(IWorkContext workContext,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     TaxSettings taxSettings,
     CurrencySettings currencySettings)
 {
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._localizationService = localizationService;
     this._taxSettings = taxSettings;
     this._currencySettings = currencySettings;
 }
 public PayPalDirectPaymentProcessor(PayPalDirectPaymentSettings paypalDirectPaymentSettings,
     ISettingService settingService, 
     ICurrencyService currencyService, ICustomerService customerService,
     CurrencySettings currencySettings, IWebHelper webHelper, 
     IOrderTotalCalculationService orderTotalCalculationService)
 {
     this._paypalDirectPaymentSettings = paypalDirectPaymentSettings;
     this._settingService = settingService;
     this._currencyService = currencyService;
     this._customerService = customerService;
     this._currencySettings = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
 }
예제 #7
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="currencyRepository">Currency repository</param>
 /// <param name="storeMappingRepository">Store mapping repository</param>
 /// <param name="currencySettings">Currency settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="eventPublisher">Event published</param>
 public CurrencyService(ICacheManager cacheManager,
     IRepository<Currency> currencyRepository,
     IRepository<StoreMapping> storeMappingRepository,
     CurrencySettings currencySettings,
     IPluginFinder pluginFinder,
     IEventPublisher eventPublisher)
 {
     this._cacheManager = cacheManager;
     this._currencyRepository = currencyRepository;
     this._storeMappingRepository = storeMappingRepository;
     this._currencySettings = currencySettings;
     this._pluginFinder = pluginFinder;
     this._eventPublisher = eventPublisher;
 }
예제 #8
0
 public FedexComputationMethod(IMeasureService measureService,
     IShippingService shippingService, ISettingService settingService,
     FedexSettings fedexSettings, IOrderTotalCalculationService orderTotalCalculationService,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     ILogger logger)
 {
     this._measureService = measureService;
     this._shippingService = shippingService;
     this._settingService = settingService;
     this._fedexSettings = fedexSettings;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._logger = logger;
 }
 public AuthorizeNetPaymentProcessor(AuthorizeNetPaymentSettings authorizeNetPaymentSettings,
     ISettingService settingService,
     ICurrencyService currencyService,
     ICustomerService customerService,
     CurrencySettings currencySettings, IWebHelper webHelper, 
     IOrderTotalCalculationService orderTotalCalculationService)
 {
     this._authorizeNetPaymentSettings = authorizeNetPaymentSettings;
     this._settingService = settingService;
     this._currencyService = currencyService;
     this._customerService = customerService;
     this._currencySettings = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
 }
 public PayPalStandardPaymentProcessor(PayPalStandardPaymentSettings paypalStandardPaymentSettings,
     ISettingService settingService, ICurrencyService currencyService,
     CurrencySettings currencySettings, IWebHelper webHelper,
     ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService, 
     IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext)
 {
     this._paypalStandardPaymentSettings = paypalStandardPaymentSettings;
     this._settingService = settingService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._webHelper = webHelper;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._taxService = taxService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._httpContext = httpContext;
 }
 public PaymentGoogleCheckoutController(ISettingService settingService, 
     IPaymentService paymentService, IOrderProcessingService orderProcessingService, 
     IWebHelper webHelper, OrderSettings orderSettings, IWorkContext workContext,
     IStoreContext storeContext, CurrencySettings currencySettings, 
     ICurrencyService currencyService, PaymentSettings paymentSettings)
 {
     this._settingService = settingService;
     this._paymentService = paymentService;
     this._orderProcessingService = orderProcessingService;
     this._webHelper = webHelper;
     this._orderSettings = orderSettings;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._currencySettings = currencySettings;
     this._currencyService = currencyService;
     this._paymentSettings = paymentSettings;
 }
예제 #12
0
 public DiscountController(IDiscountService discountService, 
     ILocalizationService localizationService, ICurrencyService currencyService,
     ICategoryService categoryService, IProductService productService,
     IWebHelper webHelper, IDateTimeHelper dateTimeHelper,
     ICustomerActivityService customerActivityService, CurrencySettings currencySettings,
     IPermissionService permissionService)
 {
     this._discountService = discountService;
     this._localizationService = localizationService;
     this._currencyService = currencyService;
     this._categoryService = categoryService;
     this._productService = productService;
     this._webHelper = webHelper;
     this._dateTimeHelper = dateTimeHelper;
     this._customerActivityService = customerActivityService;
     this._currencySettings = currencySettings;
     this._permissionService = permissionService;
 }
예제 #13
0
 public UPSComputationMethod(IMeasureService measureService,
     IShippingService shippingService, ISettingService settingService,
     UPSSettings upsSettings, ICountryService countryService,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     IOrderTotalCalculationService orderTotalCalculationService, ILogger logger,
     ILocalizationService localizationService)
 {
     this._measureService = measureService;
     this._shippingService = shippingService;
     this._settingService = settingService;
     this._upsSettings = upsSettings;
     this._countryService = countryService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._logger = logger;
     this._localizationService = localizationService;
 }
예제 #14
0
 public GiftCardController(IGiftCardService giftCardService,
     IPriceFormatter priceFormatter, IWorkflowMessageService workflowMessageService,
     IDateTimeHelper dateTimeHelper, LocalizationSettings localizationSettings,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     ILocalizationService localizationService, ILanguageService languageService,
     ICustomerActivityService customerActivityService, IPermissionService permissionService)
 {
     this._giftCardService = giftCardService;
     this._priceFormatter = priceFormatter;
     this._workflowMessageService = workflowMessageService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationSettings = localizationSettings;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
예제 #15
0
 public CurrencyController(ICurrencyService currencyService, 
     CurrencySettings currencySettings, ISettingService settingService,
     IDateTimeHelper dateTimeHelper, ILocalizationService localizationService,
     IPermissionService permissionService,
     ILocalizedEntityService localizedEntityService, ILanguageService languageService,
     IStoreService storeService, 
     IStoreMappingService storeMappingService)
 {
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._settingService = settingService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
 }
 public CheckoutAttributeController(ICheckoutAttributeService checkoutAttributeService,
     ILanguageService languageService, ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService, ITaxCategoryService taxCategoryService,
     IWorkContext workContext, ICurrencyService currencyService, 
     ICustomerActivityService customerActivityService, CurrencySettings currencySettings,
     IMeasureService measureService, MeasureSettings measureSettings,
     IPermissionService permissionService)
 {
     this._checkoutAttributeService = checkoutAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._localizationService = localizationService;
     this._taxCategoryService = taxCategoryService;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._customerActivityService = customerActivityService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._permissionService = permissionService;
 }
예제 #17
0
        public ShippingByWeightController(IShippingService shippingService,
            ICountryService countryService, IStateProvinceService stateProvinceService,
            ShippingByWeightSettings shippingByWeightSettings,
            IShippingByWeightService shippingByWeightService, ISettingService settingService,
            ILocalizationService localizationService, IPermissionService permissionService,
            ICurrencyService currencyService, CurrencySettings currencySettings,
            IMeasureService measureService, MeasureSettings measureSettings)
        {
            this._shippingService = shippingService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingByWeightSettings = shippingByWeightSettings;
            this._shippingByWeightService = shippingByWeightService;
            this._settingService = settingService;
            this._localizationService = localizationService;
            this._permissionService = permissionService;

            this._currencyService = currencyService;
            this._currencySettings = currencySettings;
            this._measureService = measureService;
            this._measureSettings = measureSettings;
        }
예제 #18
0
 public PdfService(ILocalizationService localizationService, 
     ILanguageService languageService,
     IWorkContext workContext,
     IOrderService orderService,
     IPaymentService paymentService,
     IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter,
     ICurrencyService currencyService, IMeasureService measureService,
     IPictureService pictureService, IProductService productService, 
     IProductAttributeParser productAttributeParser, IStoreService storeService,
     IStoreContext storeContext, IWebHelper webHelper, 
     CatalogSettings catalogSettings, CurrencySettings currencySettings,
     MeasureSettings measureSettings, PdfSettings pdfSettings, TaxSettings taxSettings,
     AddressSettings addressSettings)
 {
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._workContext = workContext;
     this._orderService = orderService;
     this._paymentService = paymentService;
     this._dateTimeHelper = dateTimeHelper;
     this._priceFormatter = priceFormatter;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._pictureService = pictureService;
     this._productService = productService;
     this._productAttributeParser = productAttributeParser;
     this._storeService = storeService;
     this._storeContext = storeContext;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._catalogSettings = catalogSettings;
     this._measureSettings = measureSettings;
     this._pdfSettings = pdfSettings;
     this._taxSettings = taxSettings;
     this._addressSettings = addressSettings;
 }
예제 #19
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._paymentSettings = paymentSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
 }
예제 #20
0
        public new void SetUp()
        {
            var cacheManager = new NasNullCache();

            _workContext = null;

            _currencySettings = new CurrencySettings();
            var currency1 = new Currency
            {
                Id = 1,
                Name = "Euro",
                CurrencyCode = "EUR",
                DisplayLocale =  "",
                CustomFormatting = "€0.00",
                DisplayOrder = 1,
                Published = true,
                CreatedOnUtc = DateTime.UtcNow,
                UpdatedOnUtc= DateTime.UtcNow
            };
            var currency2 = new Currency
            {
                Id = 1,
                Name = "US Dollar",
                CurrencyCode = "USD",
                DisplayLocale = "en-US",
                CustomFormatting = "",
                DisplayOrder = 2,
                Published = true,
                CreatedOnUtc = DateTime.UtcNow,
                UpdatedOnUtc= DateTime.UtcNow
            };
            _currencyRepo = MockRepository.GenerateMock<IRepository<Currency>>();
            _currencyRepo.Expect(x => x.Table).Return(new List<Currency>() { currency1, currency2 }.AsQueryable());

            _storeMappingRepo = MockRepository.GenerateMock<IRepository<StoreMapping>>();

            var pluginFinder = new PluginFinder();
            _currencyService = new CurrencyService(cacheManager, _currencyRepo,_storeMappingRepo,
                _currencySettings, pluginFinder, null);

            _taxSettings = new TaxSettings();

            _localizationService = MockRepository.GenerateMock<ILocalizationService>();
            _localizationService.Expect(x => x.GetResource("Products.InclTaxSuffix", 1, false)).Return("{0} incl tax");
            _localizationService.Expect(x => x.GetResource("Products.ExclTaxSuffix", 1, false)).Return("{0} excl tax");

            _priceFormatter = new PriceFormatter(_workContext, _currencyService,_localizationService,
                _taxSettings, _currencySettings);
        }
예제 #21
0
        public new void SetUp()
        {
            currencyUSD = new Currency()
            {
                Id = 1,
                Name = "US Dollar",
                CurrencyCode = "USD",
                Rate = 1.2M,
                DisplayLocale = "en-US",
                CustomFormatting = "",
                Published = true,
                DisplayOrder = 1,
                CreatedOnUtc = DateTime.UtcNow,
                UpdatedOnUtc = DateTime.UtcNow,
            };
            currencyEUR = new Currency()
            {
                Id = 2,
                Name = "Euro",
                CurrencyCode = "EUR",
                Rate = 1,
                DisplayLocale = "",
                CustomFormatting = "€0.00",
                Published = true,
                DisplayOrder = 2,
                CreatedOnUtc = DateTime.UtcNow,
                UpdatedOnUtc = DateTime.UtcNow,
            };
            currencyRUR = new Currency()
            {
                Id = 3,
                Name = "Russian Rouble",
                CurrencyCode = "RUB",
                Rate = 34.5M,
                DisplayLocale = "ru-RU",
                CustomFormatting = "",
                Published = true,
                DisplayOrder = 3,
                CreatedOnUtc = DateTime.UtcNow,
                UpdatedOnUtc = DateTime.UtcNow,
            };
            _currencyRepository = MockRepository.GenerateMock<IRepository<Currency>>();
            _currencyRepository.Expect(x => x.Table).Return(new List<Currency>() { currencyUSD, currencyEUR, currencyRUR }.AsQueryable());
            _currencyRepository.Expect(x => x.GetById(currencyUSD.Id)).Return(currencyUSD);
            _currencyRepository.Expect(x => x.GetById(currencyEUR.Id)).Return(currencyEUR);
            _currencyRepository.Expect(x => x.GetById(currencyRUR.Id)).Return(currencyRUR);

            _storeMappingRepo = MockRepository.GenerateMock<IRepository<StoreMapping>>();

            var cacheManager = new NasNullCache();

            _currencySettings = new CurrencySettings();
            _currencySettings.PrimaryStoreCurrencyId = currencyUSD.Id;
            _currencySettings.PrimaryExchangeRateCurrencyId = currencyEUR.Id;

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            var pluginFinder = new PluginFinder();
            _currencyService = new CurrencyService(cacheManager,
                _currencyRepository, _storeMappingRepo,
                _currencySettings, pluginFinder, _eventPublisher);
        }
예제 #22
0
 public ProductController(IProductService productService, 
     IProductTemplateService productTemplateService,
     ICategoryService categoryService, IManufacturerService manufacturerService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService, IWorkContext workContext, ILanguageService languageService, 
     ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService, IPictureService pictureService,
     ITaxCategoryService taxCategoryService, IProductTagService productTagService,
     ICopyProductService copyProductService, IPdfService pdfService,
     IExportManager exportManager, IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService, IAclService aclService,
     IStoreService storeService, IStoreMappingService storeMappingService,
      IVendorService vendorService,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     IMeasureService measureService, MeasureSettings measureSettings,
     PdfSettings pdfSettings, AdminAreaSettings adminAreaSettings)
 {
     this._productService = productService;
     this._productTemplateService = productTemplateService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._workContext = workContext;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._specificationAttributeService = specificationAttributeService;
     this._pictureService = pictureService;
     this._taxCategoryService = taxCategoryService;
     this._productTagService = productTagService;
     this._copyProductService = copyProductService;
     this._pdfService = pdfService;
     this._exportManager = exportManager;
     this._importManager = importManager;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._aclService = aclService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._vendorService = vendorService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._pdfSettings = pdfSettings;
     this._adminAreaSettings = adminAreaSettings;
 }
        public new void SetUp()
        {
            _workContext = null;
            _storeContext = null;

            var pluginFinder = new PluginFinder();
            var cacheManager = new NasNullCache();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings = new CatalogSettings();

            //price calculation service
            _discountService = MockRepository.GenerateMock<IDiscountService>();
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>();
            _priceCalcService = new PriceCalculationService(_workContext, _discountService,
                _categoryService, _productAttributeParser, _shoppingCartSettings, _catalogSettings);

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _localizationService = MockRepository.GenerateMock<ILocalizationService>();

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List<string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock<IRepository<ShippingMethod>>();
            _logger = new NullLogger();
            _shippingService = new ShippingService(_shippingMethodRepository,
                _logger,
                _productAttributeParser,
                _checkoutAttributeParser,
                _genericAttributeService,
                _localizationService,
                _shippingSettings, pluginFinder,
                _eventPublisher, _shoppingCartSettings);
            _shipmentService = MockRepository.GenerateMock<IShipmentService>();

            _paymentService = MockRepository.GenerateMock<IPaymentService>();
            _checkoutAttributeParser = MockRepository.GenerateMock<ICheckoutAttributeParser>();
            _giftCardService = MockRepository.GenerateMock<IGiftCardService>();
            _genericAttributeService = MockRepository.GenerateMock<IGenericAttributeService>();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = 10;
            _addressService = MockRepository.GenerateMock<IAddressService>();
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address() { Id = _taxSettings.DefaultTaxAddressId });
            _taxService = new TaxService(_addressService, _workContext, _taxSettings, pluginFinder);

            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                _priceCalcService, _taxService, _shippingService, _paymentService,
                _checkoutAttributeParser, _discountService, _giftCardService,
                _genericAttributeService,
                _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings);

            _orderService = MockRepository.GenerateMock<IOrderService>();
            _webHelper = MockRepository.GenerateMock<IWebHelper>();
            _languageService = MockRepository.GenerateMock<ILanguageService>();
            _productService = MockRepository.GenerateMock<IProductService>();
            _priceFormatter= MockRepository.GenerateMock<IPriceFormatter>();
            _productAttributeFormatter= MockRepository.GenerateMock<IProductAttributeFormatter>();
            _shoppingCartService= MockRepository.GenerateMock<IShoppingCartService>();
            _checkoutAttributeFormatter= MockRepository.GenerateMock<ICheckoutAttributeFormatter>();
            _customerService= MockRepository.GenerateMock<ICustomerService>();
            _encryptionService = MockRepository.GenerateMock<IEncryptionService>();
            _workflowMessageService = MockRepository.GenerateMock<IWorkflowMessageService>();
            _customerActivityService = MockRepository.GenerateMock<ICustomerActivityService>();
            _currencyService = MockRepository.GenerateMock<ICurrencyService>();
            _affiliateService = MockRepository.GenerateMock<IAffiliateService>();
            _vendorService = MockRepository.GenerateMock<IVendorService>();

            _paymentSettings = new PaymentSettings()
            {
                ActivePaymentMethodSystemNames = new List<string>()
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings = new OrderSettings();

            _localizationSettings = new LocalizationSettings();

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _currencySettings = new CurrencySettings();

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                _localizationService, _languageService,
                _productService, _paymentService, _logger,
                _orderTotalCalcService, _priceCalcService, _priceFormatter,
                _productAttributeParser, _productAttributeFormatter,
                _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                _shippingService, _shipmentService, _taxService,
                _customerService, _discountService,
                _encryptionService, _workContext,
                _workflowMessageService, _vendorService,
                _customerActivityService, _currencyService, _affiliateService,
                _eventPublisher, _paymentSettings, _rewardPointsSettings,
                _orderSettings, _taxSettings, _localizationSettings,
                _currencySettings);
        }
예제 #24
0
        public OrderController(IOrderService orderService, 
            IOrderReportService orderReportService, IOrderProcessingService orderProcessingService,
            IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter,
            IDiscountService discountService, ILocalizationService localizationService,
            IWorkContext workContext, ICurrencyService currencyService,
            IEncryptionService encryptionService, IPaymentService paymentService,
            IMeasureService measureService, IPdfService pdfService,
            IAddressService addressService, ICountryService countryService,
            IStateProvinceService stateProvinceService, IProductService productService,
            IExportManager exportManager, IPermissionService permissionService,
            IWorkflowMessageService workflowMessageService,
            ICategoryService categoryService, IManufacturerService manufacturerService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser,
            IProductAttributeFormatter productAttributeFormatter, IShoppingCartService shoppingCartService,
            IGiftCardService giftCardService, IDownloadService downloadService,
            IShipmentService shipmentService, IStoreService storeService, IVendorService vendorService,
            CatalogSettings catalogSettings, CurrencySettings currencySettings, TaxSettings taxSettings,
            MeasureSettings measureSettings, PdfSettings pdfSettings, AddressSettings addressSettings)
        {
            this._orderService = orderService;
            this._orderReportService = orderReportService;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._discountService = discountService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._encryptionService = encryptionService;
            this._paymentService = paymentService;
            this._measureService = measureService;
            this._pdfService = pdfService;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._productService = productService;
            this._exportManager = exportManager;
            this._permissionService = permissionService;
            this._workflowMessageService = workflowMessageService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeFormatter = productAttributeFormatter;
            this._shoppingCartService = shoppingCartService;
            this._giftCardService = giftCardService;
            this._downloadService = downloadService;
            this._shipmentService = shipmentService;
            this._storeService = storeService;
            this._vendorService = vendorService;

            this._catalogSettings = catalogSettings;
            this._currencySettings = currencySettings;
            this._taxSettings = taxSettings;
            this._measureSettings = measureSettings;
            this._pdfSettings = pdfSettings;
            this._addressSettings = addressSettings;
        }