public UpdateExchangeRateTask(ICurrencyService currencyService, ISettingService settingService, CurrencySettings currencySettings) { this._currencyService = currencyService; this._settingService = settingService; this._currencySettings = currencySettings; }
public WebWorkContext(Func<string, ICacheManager> cacheManager, HttpContextBase httpContext, ICustomerService customerService, IStoreContext storeContext, IAuthenticationService authenticationService, ILanguageService languageService, ICurrencyService currencyService, IGenericAttributeService attrService, TaxSettings taxSettings, CurrencySettings currencySettings, LocalizationSettings localizationSettings, Lazy<ITaxService> taxService, IStoreService storeService, ISettingService settingService, IUserAgent userAgent) { this._cacheManager = cacheManager("static"); this._httpContext = httpContext; this._customerService = customerService; this._storeContext = storeContext; this._authenticationService = authenticationService; this._languageService = languageService; this._attrService = attrService; this._currencyService = currencyService; this._taxSettings = taxSettings; this._taxService = taxService; this._currencySettings = currencySettings; this._localizationSettings = localizationSettings; this._storeService = storeService; this._settingService = settingService; this._userAgent = userAgent; }
public PayPalExpressController( IPaymentService paymentService, IOrderService orderService, IOrderProcessingService orderProcessingService, ILogger logger, PaymentSettings paymentSettings, ILocalizationService localizationService, OrderSettings orderSettings, ICurrencyService currencyService, CurrencySettings currencySettings, IOrderTotalCalculationService orderTotalCalculationService, ICustomerService customerService, IGenericAttributeService genericAttributeService, IComponentContext ctx, ICommonServices services, IStoreService storeService) { _paymentService = paymentService; _orderService = orderService; _orderProcessingService = orderProcessingService; _logger = logger; _paymentSettings = paymentSettings; _localizationService = localizationService; _orderSettings = orderSettings; _currencyService = currencyService; _currencySettings = currencySettings; _orderTotalCalculationService = orderTotalCalculationService; _customerService = customerService; _genericAttributeService = genericAttributeService; _services = services; _storeService = storeService; _helper = new PluginHelper(ctx, "SmartStore.PayPal", "Plugins.Payments.PayPalExpress"); T = NullLocalizer.Instance; }
public UpdateExchangeRateTask( ICurrencyService currencyService, CurrencySettings currencySettings, ICommonServices services) { this._currencyService = currencyService; this._currencySettings = currencySettings; this._services = services; }
/// <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, IStoreMappingService storeMappingService, CurrencySettings currencySettings, IPluginFinder pluginFinder, IEventPublisher eventPublisher) { this._cacheManager = cacheManager; this._currencyRepository = currencyRepository; this._storeMappingService = storeMappingService; this._currencySettings = currencySettings; this._pluginFinder = pluginFinder; this._eventPublisher = eventPublisher; }
public PayPalStandardProvider(ICurrencyService currencyService, HttpContextBase httpContext, CurrencySettings currencySettings, IOrderTotalCalculationService orderTotalCalculationService, ICommonServices commonServices, ILogger logger) { _currencyService = currencyService; _currencySettings = currencySettings; _orderTotalCalculationService = orderTotalCalculationService; _httpContext = httpContext; _commonServices = commonServices; _logger = logger; }
public new void SetUp() { var cacheManager = new NullCache(); _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()); _storeMappingService = MockRepository.GenerateMock<IStoreMappingService>(); var pluginFinder = new PluginFinder(); _currencyService = new CurrencyService(cacheManager, _currencyRepo, _storeMappingService, _currencySettings, pluginFinder, null, this.ProviderManager); _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); }
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; }
public ShippingByWeightController(IShippingService shippingService, IStoreService storeService, ICountryService countryService, ShippingByWeightSettings shippingByWeightSettings, IShippingByWeightService shippingByWeightService, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, IMeasureService measureService, MeasureSettings measureSettings) { this._shippingService = shippingService; this._storeService = storeService; this._countryService = countryService; this._shippingByWeightSettings = shippingByWeightSettings; this._shippingByWeightService = shippingByWeightService; this._settingService = settingService; this._currencyService = currencyService; this._currencySettings = currencySettings; this._measureService = measureService; this._measureSettings = measureSettings; }
public CurrencyController(ICurrencyService currencyService, CurrencySettings currencySettings, IDateTimeHelper dateTimeHelper, ILocalizedEntityService localizedEntityService, ILanguageService languageService, IStoreMappingService storeMappingService, PluginMediator pluginMediator, ICommonServices services) { this._currencyService = currencyService; this._currencySettings = currencySettings; this._dateTimeHelper = dateTimeHelper; this._localizedEntityService = localizedEntityService; this._languageService = languageService; this._storeMappingService = storeMappingService; this._pluginMediator = pluginMediator; this._services = services; }
private readonly static object _lock = new object(); // codehint: sm-add #endregion #region Constructors public CommonController(IPaymentService paymentService, IShippingService shippingService, 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, IImageCache imageCache, SecuritySettings securitySettings, ITypeFinder typeFinder, IPluginFinder pluginFinder, IGenericAttributeService genericAttributeService, IDbContext dbContext) { this._paymentService = paymentService; this._shippingService = shippingService; 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; this._imageCache = imageCache; // codehint: sm-add this._securitySettings = securitySettings; // codehint: sm-add this._typeFinder = typeFinder; // codehint: sm-add this._pluginFinder = pluginFinder; // codehint: sm-add this._genericAttributeService = genericAttributeService; // codehint: sm-add this._dbContext = dbContext; // codehint: sm-add }
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; }
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 AmazonPayApi( ICountryService countryService, IStateProvinceService stateProvinceService, IOrderService orderService, IAddressService addressService, IDateTimeHelper dateTimeHelper, CurrencySettings currencySettings, IOrderTotalCalculationService orderTotalCalculationService, ICommonServices services) { _countryService = countryService; _stateProvinceService = stateProvinceService; _orderService = orderService; _addressService = addressService; _dateTimeHelper = dateTimeHelper; _currencySettings = currencySettings; _orderTotalCalculationService = orderTotalCalculationService; _services = services; }
public AmazonPayService( IAmazonPayApi api, HttpContextBase httpContext, ICommonServices services, IPaymentService paymentService, IGenericAttributeService genericAttributeService, IOrderTotalCalculationService orderTotalCalculationService, ICurrencyService currencyService, CurrencySettings currencySettings, ICustomerService customerService, IStoreService storeService, IPriceFormatter priceFormatter, OrderSettings orderSettings, RewardPointsSettings rewardPointsSettings, IOrderService orderService, IRepository<Order> orderRepository, IOrderProcessingService orderProcessingService, IScheduleTaskService scheduleTaskService, IWorkflowMessageService workflowMessageService) { _api = api; _httpContext = httpContext; _services = services; _paymentService = paymentService; _genericAttributeService = genericAttributeService; _orderTotalCalculationService = orderTotalCalculationService; _currencyService = currencyService; _currencySettings = currencySettings; _customerService = customerService; _storeService = storeService; _priceFormatter = priceFormatter; _orderSettings = orderSettings; _rewardPointsSettings = rewardPointsSettings; _orderService = orderService; _orderRepository = orderRepository; _orderProcessingService = orderProcessingService; _scheduleTaskService = scheduleTaskService; _workflowMessageService = workflowMessageService; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
private readonly ILocalizationService _localizationService; // codehint: sm-add #endregion #region Ctor public PayPalStandardPaymentProcessor(PayPalStandardPaymentSettings paypalStandardPaymentSettings, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, IWebHelper webHelper, ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService, IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext, ILocalizationService localizationService) { 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; this._localizationService = localizationService; // codehint: sm-add _helper = new PluginHelperBase("Payments.PayPalStandard"); // codehint: sm-add }
public ShippingByTotalController(IShippingService shippingService, IStoreService storeService, ISettingService settingService, IShippingByTotalService shippingByTotalService, ShippingByTotalSettings shippingByTotalSettings, ICountryService countryService, IStateProvinceService stateProvinceService, ICurrencyService currencyService, CurrencySettings currencySettings) { this._shippingService = shippingService; this._storeService = storeService; this._settingService = settingService; this._shippingByTotalService = shippingByTotalService; this._shippingByTotalSettings = shippingByTotalSettings; this._countryService = countryService; this._stateProvinceService = stateProvinceService; this._currencyService = currencyService; this._currencySettings = currencySettings; }
public ByTotalController(IShippingService shippingService, IStoreService storeService, ISettingService settingService, IShippingByTotalService shippingByTotalService, ShippingByTotalSettings shippingByTotalSettings, ICountryService countryService, ICurrencyService currencyService, CurrencySettings currencySettings, AdminAreaSettings adminAreaSettings) { this._shippingService = shippingService; this._storeService = storeService; this._settingService = settingService; this._shippingByTotalService = shippingByTotalService; this._shippingByTotalSettings = shippingByTotalSettings; this._countryService = countryService; this._currencyService = currencyService; this._currencySettings = currencySettings; this._adminAreaSettings = adminAreaSettings; }
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; }
public PdfService(ILocalizationService localizationService, 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, StoreInformationSettings storeInformationSettings, AddressSettings addressSettings, CompanyInformationSettings companyInformationSettings, BankConnectionSettings bankConnectionSettings, ContactDataSettings contactDataSettings) { this._localizationService = localizationService; 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._storeInformationSettings = storeInformationSettings; this._addressSettings = addressSettings; //codehint: sm-add this._companyInformationSettings = companyInformationSettings; this._bankConnectionSettings = bankConnectionSettings; this._contactDataSettings = contactDataSettings; }
/// <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="storeContext">Store 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, IStoreContext storeContext, IWorkflowMessageService workflowMessageService, ICustomerActivityService customerActivityService, ICurrencyService currencyService, IAffiliateService affiliateService, IEventPublisher eventPublisher, IGenericAttributeService genericAttributeService, PaymentSettings paymentSettings, RewardPointsSettings rewardPointsSettings, OrderSettings orderSettings, TaxSettings taxSettings, LocalizationSettings localizationSettings, CurrencySettings currencySettings, ShoppingCartSettings shoppingCartSettings) { 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._storeContext = storeContext; this._workflowMessageService = workflowMessageService; 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._genericAttributeService = genericAttributeService; this._paymentSettings = paymentSettings; this._rewardPointsSettings = rewardPointsSettings; this._orderSettings = orderSettings; this._taxSettings = taxSettings; this._localizationSettings = localizationSettings; this._currencySettings = currencySettings; this._shoppingCartSettings = shoppingCartSettings; }
public new void SetUp() { _workContext = null; _store = new Store() { Id = 1 }; _storeContext = MockRepository.GenerateMock<IStoreContext>(); _storeContext.Expect(x => x.CurrentStore).Return(_store); var pluginFinder = new PluginFinder(); var cacheManager = new NullCache(); _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, _storeContext, _discountService, _categoryService, _productAttributeParser, _productService, _shoppingCartSettings, _catalogSettings); _eventPublisher = MockRepository.GenerateMock<IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything)); _localizationService = MockRepository.GenerateMock<ILocalizationService>(); _settingService = MockRepository.GenerateMock<ISettingService>(); //shipping _shippingSettings = new ShippingSettings(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List<string>(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod"); _shippingMethodRepository = MockRepository.GenerateMock<IRepository<ShippingMethod>>(); _logger = new NullLogger(); _shippingService = new ShippingService(cacheManager, _shippingMethodRepository, _logger, _productAttributeParser, _productService, _checkoutAttributeParser, _genericAttributeService, _localizationService, _shippingSettings, pluginFinder, _eventPublisher, _shoppingCartSettings, _settingService); _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, _shoppingCartSettings, pluginFinder, _settingService); _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>(); _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, _storeContext, _workflowMessageService, _customerActivityService, _currencyService, _affiliateService, _eventPublisher, _paymentSettings, _rewardPointsSettings, _orderSettings, _taxSettings, _localizationSettings, _currencySettings); }
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 = "de-DE", 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); _storeMappingService = MockRepository.GenerateMock<IStoreMappingService>(); var cacheManager = new NullCache(); _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, _storeMappingService, _currencySettings, pluginFinder, _eventPublisher); }
public CatalogController(ICommonServices services, ICategoryService categoryService, IManufacturerService manufacturerService, IProductService productService, IProductTemplateService productTemplateService, ICategoryTemplateService categoryTemplateService, IManufacturerTemplateService manufacturerTemplateService, IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser, IProductAttributeFormatter productAttributeFormatter, ITaxService taxService, ICurrencyService currencyService, IPictureService pictureService, IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter, ISpecificationAttributeService specificationAttributeService, ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper, IShoppingCartService shoppingCartService, IRecentlyViewedProductsService recentlyViewedProductsService, ICompareProductsService compareProductsService, IWorkflowMessageService workflowMessageService, IProductTagService productTagService, IOrderReportService orderReportService, IGenericAttributeService genericAttributeService, IBackInStockSubscriptionService backInStockSubscriptionService, IAclService aclService, IStoreMappingService storeMappingService, IPermissionService permissionService, IDownloadService downloadService, MediaSettings mediaSettings, CatalogSettings catalogSettings, ShoppingCartSettings shoppingCartSettings, LocalizationSettings localizationSettings, CustomerSettings customerSettings, CurrencySettings currencySettings, CaptchaSettings captchaSettings, /* codehint: sm-add */ IMeasureService measureService, MeasureSettings measureSettings, TaxSettings taxSettings, IFilterService filterService, IDeliveryTimeService deliveryTimeService, ISettingService settingService, ICustomerActivityService customerActivityService ) { this._services = services; this._categoryService = categoryService; this._manufacturerService = manufacturerService; this._productService = productService; this._productTemplateService = productTemplateService; this._categoryTemplateService = categoryTemplateService; this._manufacturerTemplateService = manufacturerTemplateService; this._productAttributeService = productAttributeService; this._productAttributeParser = productAttributeParser; this._productAttributeFormatter = productAttributeFormatter; this._workContext = _services.WorkContext; this._storeContext = _services.StoreContext; this._taxService = taxService; this._currencyService = currencyService; this._pictureService = pictureService; this._localizationService = _services.Localization; this._priceCalculationService = priceCalculationService; this._priceFormatter = priceFormatter; this._webHelper = _services.WebHelper; this._specificationAttributeService = specificationAttributeService; this._customerContentService = customerContentService; this._dateTimeHelper = dateTimeHelper; this._shoppingCartService = shoppingCartService; this._recentlyViewedProductsService = recentlyViewedProductsService; this._compareProductsService = compareProductsService; this._workflowMessageService = workflowMessageService; this._productTagService = productTagService; this._orderReportService = orderReportService; this._genericAttributeService = genericAttributeService; this._backInStockSubscriptionService = backInStockSubscriptionService; this._aclService = aclService; this._storeMappingService = storeMappingService; this._permissionService = permissionService; this._downloadService = downloadService; this._customerActivityService = customerActivityService; //codehint: sm-edit begin this._measureService = measureService; this._measureSettings = measureSettings; this._taxSettings = taxSettings; this._filterService = filterService; this._deliveryTimeService = deliveryTimeService; this._dbContext = _services.DbContext; this._settingService = settingService; this._eventPublisher = _services.EventPublisher; //codehint: sm-edit end this._mediaSettings = mediaSettings; this._catalogSettings = catalogSettings; this._shoppingCartSettings = shoppingCartSettings; this._localizationSettings = localizationSettings; this._customerSettings = customerSettings; this._captchaSettings = captchaSettings; this._currencySettings = currencySettings; this._cacheManager = _services.Cache; T = NullLocalizer.Instance; }
public OrderController(IOrderService orderService, IOrderReportService orderReportService, IOrderProcessingService orderProcessingService, IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter, ILocalizationService localizationService, IWorkContext workContext, ICurrencyService currencyService, IEncryptionService encryptionService, IPaymentService paymentService, IMeasureService measureService, 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, ICheckoutAttributeFormatter checkoutAttributeFormatter, IGiftCardService giftCardService, IDownloadService downloadService, IShipmentService shipmentService, IStoreService storeService, ITaxService taxService, IPriceCalculationService priceCalculationService, IEventPublisher eventPublisher, ICustomerService customerService, PluginMediator pluginMediator, IAffiliateService affiliateService, CatalogSettings catalogSettings, CurrencySettings currencySettings, TaxSettings taxSettings, MeasureSettings measureSettings, PdfSettings pdfSettings, AddressSettings addressSettings, IPdfConverter pdfConverter, ICommonServices services, Lazy<IPictureService> pictureService) { this._orderService = orderService; this._orderReportService = orderReportService; this._orderProcessingService = orderProcessingService; this._dateTimeHelper = dateTimeHelper; this._priceFormatter = priceFormatter; this._localizationService = localizationService; this._workContext = workContext; this._currencyService = currencyService; this._encryptionService = encryptionService; this._paymentService = paymentService; this._measureService = measureService; 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._taxService = taxService; this._priceCalculationService = priceCalculationService; this._eventPublisher = eventPublisher; this._customerService = customerService; this._pluginMediator = pluginMediator; this._affiliateService = affiliateService; this._catalogSettings = catalogSettings; this._currencySettings = currencySettings; this._taxSettings = taxSettings; this._measureSettings = measureSettings; this._pdfSettings = pdfSettings; this._addressSettings = addressSettings; this._checkoutAttributeFormatter = checkoutAttributeFormatter; _pdfConverter = pdfConverter; _services = services; _pictureService = pictureService; }
public CatalogHelper( ICommonServices services, ICategoryService categoryService, IManufacturerService manufacturerService, IProductService productService, IProductTemplateService productTemplateService, IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser, IProductAttributeFormatter productAttributeFormatter, ITaxService taxService, ICurrencyService currencyService, IPictureService pictureService, IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter, ISpecificationAttributeService specificationAttributeService, IDateTimeHelper dateTimeHelper, IBackInStockSubscriptionService backInStockSubscriptionService, IDownloadService downloadService, MediaSettings mediaSettings, CatalogSettings catalogSettings, CustomerSettings customerSettings, CurrencySettings currencySettings, CaptchaSettings captchaSettings, IMeasureService measureService, MeasureSettings measureSettings, TaxSettings taxSettings, IDeliveryTimeService deliveryTimeService, ISettingService settingService, Lazy<IMenuPublisher> _menuPublisher, HttpRequestBase httpRequest, UrlHelper urlHelper) { this._services = services; this._categoryService = categoryService; this._manufacturerService = manufacturerService; this._productService = productService; this._productTemplateService = productTemplateService; this._productAttributeService = productAttributeService; this._productAttributeParser = productAttributeParser; this._productAttributeFormatter = productAttributeFormatter; this._taxService = taxService; this._currencyService = currencyService; this._pictureService = pictureService; this._localizationService = _services.Localization; this._priceCalculationService = priceCalculationService; this._priceFormatter = priceFormatter; this._specificationAttributeService = specificationAttributeService; this._dateTimeHelper = dateTimeHelper; this._backInStockSubscriptionService = backInStockSubscriptionService; this._downloadService = downloadService; this._measureService = measureService; this._measureSettings = measureSettings; this._taxSettings = taxSettings; this._deliveryTimeService = deliveryTimeService; this._settingService = settingService; this._mediaSettings = mediaSettings; this._catalogSettings = catalogSettings; this._customerSettings = customerSettings; this._captchaSettings = captchaSettings; this._currencySettings = currencySettings; this._menuPublisher = _menuPublisher; this._httpRequest = httpRequest; this._urlHelper = urlHelper; T = NullLocalizer.Instance; }