public new void SetUp() { _productService = new Mock <IProductService>(); _storeContext = new Mock <IStoreContext>(); _discountService = new Mock <IDiscountService>(); _categoryService = new Mock <ICategoryService>(); _manufacturerService = new Mock <IManufacturerService>(); _productAttributeParser = new Mock <IProductAttributeParser>(); _eventPublisher = new Mock <IEventPublisher>(); _localizationService = new Mock <ILocalizationService>(); _shippingMethodRepository = new Mock <IRepository <ShippingMethod> >(); _warehouseRepository = new Mock <IRepository <Warehouse> >(); _shipmentService = new Mock <IShipmentService>(); _paymentService = new Mock <IPaymentService>(); _checkoutAttributeParser = new Mock <ICheckoutAttributeParser>(); _giftCardService = new Mock <IGiftCardService>(); _genericAttributeService = new Mock <IGenericAttributeService>(); _geoLookupService = new Mock <IGeoLookupService>(); _countryService = new Mock <ICountryService>(); _stateProvinceService = new Mock <IStateProvinceService>(); _eventPublisher = new Mock <IEventPublisher>(); _addressService = new Mock <IAddressService>(); _rewardPointService = new Mock <IRewardPointService>(); _orderService = new Mock <IOrderService>(); _webHelper = new Mock <IWebHelper>(); _languageService = new Mock <ILanguageService>(); _priceFormatter = new Mock <IPriceFormatter>(); _productAttributeFormatter = new Mock <IProductAttributeFormatter>(); _shoppingCartService = new Mock <IShoppingCartService>(); _checkoutAttributeFormatter = new Mock <ICheckoutAttributeFormatter>(); _customerService = new Mock <ICustomerService>(); _encryptionService = new Mock <IEncryptionService>(); _workflowMessageService = new Mock <IWorkflowMessageService>(); _customerActivityService = new Mock <ICustomerActivityService>(); _currencyService = new Mock <ICurrencyService>(); _affiliateService = new Mock <IAffiliateService>(); _vendorService = new Mock <IVendorService>(); _pdfService = new Mock <IPdfService>(); _customNumberFormatter = new Mock <ICustomNumberFormatter>(); _rewardPointService = new Mock <IRewardPointService>(); _workContext = null; _store = new Store { Id = 1 }; _storeContext.Setup(x => x.CurrentStore).Returns(_store); _shoppingCartSettings = new ShoppingCartSettings(); _catalogSettings = new CatalogSettings(); var cacheManager = new TestCacheManager(); _currencySettings = new CurrencySettings(); //price calculation service _priceCalcService = new PriceCalculationService(_catalogSettings, _currencySettings, _categoryService.Object, _currencyService.Object, _discountService.Object, _manufacturerService.Object, _productAttributeParser.Object, _productService.Object, cacheManager, _storeContext.Object, _workContext, _shoppingCartSettings); _eventPublisher.Setup(x => x.Publish(It.IsAny <object>())); var loger = new Mock <ILogger>(); var pluginService = new PluginService(_catalogSettings, _customerService.Object, loger.Object, CommonHelper.DefaultFileProvider, _webHelper.Object); _paymentPluginManager = new PaymentPluginManager(pluginService, null, _paymentSettings); _pickupPluginManager = new PickupPluginManager(pluginService, _shippingSettings); _shippingPluginManager = new ShippingPluginManager(pluginService, _shippingSettings); _taxPluginManager = new TaxPluginManager(pluginService, _taxSettings); //shipping _shippingSettings = new ShippingSettings { ActiveShippingRateComputationMethodSystemNames = new List <string>() }; _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod"); _logger = new NullLogger(); _customerSettings = new CustomerSettings(); _addressSettings = new AddressSettings(); _shippingService = new ShippingService(_addressService.Object, cacheManager, _checkoutAttributeParser.Object, _eventPublisher.Object, _genericAttributeService.Object, _localizationService.Object, _logger, _pickupPluginManager, _priceCalcService, _productAttributeParser.Object, _productService.Object, _shippingMethodRepository.Object, _warehouseRepository.Object, _shippingPluginManager, _storeContext.Object, _shippingSettings, _shoppingCartSettings); //tax _taxSettings = new TaxSettings { ShippingIsTaxable = true, PaymentMethodAdditionalFeeIsTaxable = true, DefaultTaxAddressId = 10 }; _addressService.Setup(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Returns(new Address { Id = _taxSettings.DefaultTaxAddressId }); _taxService = new TaxService(_addressSettings, _customerSettings, _addressService.Object, _countryService.Object, _genericAttributeService.Object, _geoLookupService.Object, _logger, _stateProvinceService.Object, cacheManager, _storeContext.Object, _taxPluginManager, _webHelper.Object, _workContext, _shippingSettings, _taxSettings); _rewardPointsSettings = new RewardPointsSettings(); _orderTotalCalcService = new OrderTotalCalculationService(_catalogSettings, _checkoutAttributeParser.Object, _discountService.Object, _genericAttributeService.Object, _giftCardService.Object, _paymentService.Object, _priceCalcService, _rewardPointService.Object, _shippingPluginManager, _shippingService, _shoppingCartService.Object, _storeContext.Object, _taxService, _workContext, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _taxSettings); _paymentSettings = new PaymentSettings { ActivePaymentMethodSystemNames = new List <string> { "Payments.TestMethod" } }; _orderSettings = new OrderSettings(); _localizationSettings = new LocalizationSettings(); _eventPublisher.Setup(x => x.Publish(It.IsAny <object>())); _orderProcessingService = new OrderProcessingService(_currencySettings, _affiliateService.Object, _checkoutAttributeFormatter.Object, _countryService.Object, _currencyService.Object, _customerActivityService.Object, _customerService.Object, _customNumberFormatter.Object, _discountService.Object, _encryptionService.Object, _eventPublisher.Object, _genericAttributeService.Object, _giftCardService.Object, _languageService.Object, _localizationService.Object, _logger, _orderService.Object, _orderTotalCalcService, _paymentPluginManager, _paymentService.Object, _pdfService.Object, _priceCalcService, _priceFormatter.Object, _productAttributeFormatter.Object, _productAttributeParser.Object, _productService.Object, _rewardPointService.Object, _shipmentService.Object, _shippingPluginManager, _shippingService, _shoppingCartService.Object, _stateProvinceService.Object, _storeContext.Object, _taxService, _vendorService.Object, _webHelper.Object, _workContext, _workflowMessageService.Object, _localizationSettings, _orderSettings, _paymentSettings, _rewardPointsSettings, _shippingSettings, _taxSettings); }
public OverriddenProductController(AvalaraTaxManager avalaraTaxManager, IAclService aclService, IBackInStockSubscriptionService backInStockSubscriptionService, ICategoryService categoryService, ICopyProductService copyProductService, ICustomerActivityService customerActivityService, ICustomerService customerService, IDiscountService discountService, IDownloadService downloadService, IExportManager exportManager, IImportManager importManager, ILanguageService languageService, ILocalizationService localizationService, ILocalizedEntityService localizedEntityService, IManufacturerService manufacturerService, IQNetFileProvider fileProvider, INotificationService notificationService, IPdfService pdfService, IPermissionService permissionService, IPictureService pictureService, IProductAttributeParser productAttributeParser, IProductAttributeService productAttributeService, IProductModelFactory productModelFactory, IProductService productService, IProductTagService productTagService, ISettingService settingService, IShippingService shippingService, IShoppingCartService shoppingCartService, ISpecificationAttributeService specificationAttributeService, ITaxCategoryService taxCategoryService, ITaxPluginManager taxPluginManager, IUrlRecordService urlRecordService, IWorkContext workContext, VendorSettings vendorSettings) : base(aclService, backInStockSubscriptionService, categoryService, copyProductService, customerActivityService, customerService, discountService, downloadService, exportManager, importManager, languageService, localizationService, localizedEntityService, manufacturerService, fileProvider, notificationService, pdfService, permissionService, pictureService, productAttributeParser, productAttributeService, productModelFactory, productService, productTagService, settingService, shippingService, shoppingCartService, specificationAttributeService, urlRecordService, workContext, vendorSettings) { _avalaraTaxManager = avalaraTaxManager; _localizationService = localizationService; _notificationService = notificationService; _permissionService = permissionService; _productAttributeService = productAttributeService; _productService = productService; _taxCategoryService = taxCategoryService; _taxPluginManager = taxPluginManager; }
public CommonModelFactory(AdminAreaSettings adminAreaSettings, CatalogSettings catalogSettings, CurrencySettings currencySettings, IActionContextAccessor actionContextAccessor, IAuthenticationPluginManager authenticationPluginManager, ICurrencyService currencyService, ICustomerService customerService, IDateTimeHelper dateTimeHelper, INopFileProvider fileProvider, IExchangeRatePluginManager exchangeRatePluginManager, IHttpContextAccessor httpContextAccessor, ILanguageService languageService, ILocalizationService localizationService, IMaintenanceService maintenanceService, IMeasureService measureService, IOrderService orderService, IPaymentPluginManager paymentPluginManager, IPickupPluginManager pickupPluginManager, IPluginService pluginService, IProductService productService, IReturnRequestService returnRequestService, ISearchTermService searchTermService, IShippingPluginManager shippingPluginManager, IStaticCacheManager cacheManager, IStoreContext storeContext, IStoreService storeService, ITaxPluginManager taxPluginManager, IUrlHelperFactory urlHelperFactory, IUrlRecordService urlRecordService, IWebHelper webHelper, IWidgetPluginManager widgetPluginManager, IWorkContext workContext, MeasureSettings measureSettings, NopConfig nopConfig, NopHttpClient nopHttpClient, ProxySettings proxySettings) { _adminAreaSettings = adminAreaSettings; _catalogSettings = catalogSettings; _currencySettings = currencySettings; _actionContextAccessor = actionContextAccessor; _authenticationPluginManager = authenticationPluginManager; _currencyService = currencyService; _customerService = customerService; _dateTimeHelper = dateTimeHelper; _exchangeRatePluginManager = exchangeRatePluginManager; _httpContextAccessor = httpContextAccessor; _languageService = languageService; _localizationService = localizationService; _maintenanceService = maintenanceService; _measureService = measureService; _fileProvider = fileProvider; _orderService = orderService; _paymentPluginManager = paymentPluginManager; _pickupPluginManager = pickupPluginManager; _pluginService = pluginService; _productService = productService; _returnRequestService = returnRequestService; _searchTermService = searchTermService; _shippingPluginManager = shippingPluginManager; _cacheManager = cacheManager; _storeContext = storeContext; _storeService = storeService; _taxPluginManager = taxPluginManager; _urlHelperFactory = urlHelperFactory; _urlRecordService = urlRecordService; _webHelper = webHelper; _widgetPluginManager = widgetPluginManager; _workContext = workContext; _measureSettings = measureSettings; _nopConfig = nopConfig; _nopHttpClient = nopHttpClient; _proxySettings = proxySettings; }
public OverriddenShoppingCartModelFactory(AddressSettings addressSettings, CaptchaSettings captchaSettings, CatalogSettings catalogSettings, CommonSettings commonSettings, CustomerSettings customerSettings, IAddressService addressService, IAddressModelFactory addressModelFactory, ICheckoutAttributeFormatter checkoutAttributeFormatter, ICheckoutAttributeParser checkoutAttributeParser, ICheckoutAttributeService checkoutAttributeService, ICountryService countryService, ICurrencyService currencyService, ICustomerService customerService, IDateTimeHelper dateTimeHelper, IDiscountService discountService, IDownloadService downloadService, IGenericAttributeService genericAttributeService, IGiftCardService giftCardService, IHttpContextAccessor httpContextAccessor, ILocalizationService localizationService, IOrderProcessingService orderProcessingService, IOrderTotalCalculationService orderTotalCalculationService, IPaymentPluginManager paymentPluginManager, IPaymentService paymentService, IPermissionService permissionService, IPictureService pictureService, IPriceFormatter priceFormatter, IProductAttributeFormatter productAttributeFormatter, IProductService productService, IShippingPluginManager shippingPluginManager, IShippingService shippingService, IShoppingCartService shoppingCartService, IStateProvinceService stateProvinceService, IStaticCacheManager cacheManager, IStoreContext storeContext, ITaxPluginManager taxPluginManager, ITaxService taxService, IUrlRecordService urlRecordService, IVendorService vendorService, IWebHelper webHelper, IWorkContext workContext, MediaSettings mediaSettings, OrderSettings orderSettings, RewardPointsSettings rewardPointsSettings, ShippingSettings shippingSettings, ShoppingCartSettings shoppingCartSettings, TaxSettings taxSettings, VendorSettings vendorSettings) : base(addressSettings, captchaSettings, catalogSettings, commonSettings, customerSettings, addressModelFactory, checkoutAttributeFormatter, checkoutAttributeParser, checkoutAttributeService, countryService, currencyService, customerService, dateTimeHelper, discountService, downloadService, genericAttributeService, giftCardService, httpContextAccessor, localizationService, orderProcessingService, orderTotalCalculationService, paymentPluginManager, paymentService, permissionService, pictureService, priceFormatter, productAttributeFormatter, productService, shippingPluginManager, shippingService, shoppingCartService, stateProvinceService, cacheManager, storeContext, taxService, urlRecordService, vendorService, webHelper, workContext, mediaSettings, orderSettings, rewardPointsSettings, shippingSettings, shoppingCartSettings, taxSettings, vendorSettings) { _addressService = addressService; _countryService = countryService; _currencyService = currencyService; _genericAttributeService = genericAttributeService; _giftCardService = giftCardService; _httpContextAccessor = httpContextAccessor; _orderTotalCalculationService = orderTotalCalculationService; _paymentService = paymentService; _priceFormatter = priceFormatter; _productService = productService; _shippingPluginManager = shippingPluginManager; _shoppingCartService = shoppingCartService; _stateProvinceService = stateProvinceService; _storeContext = storeContext; _taxPluginManager = taxPluginManager; _taxService = taxService; _workContext = workContext; _rewardPointsSettings = rewardPointsSettings; _shippingSettings = shippingSettings; _taxSettings = taxSettings; }
public ExportItemsViewComponent(IPermissionService permissionService, ITaxPluginManager taxPluginManager) { _permissionService = permissionService; _taxPluginManager = taxPluginManager; }
public new void SetUp() { _taxSettings = new TaxSettings { DefaultTaxAddressId = 10 }; _workContext = null; _storeContext = new Mock <IStoreContext>(); _storeContext.Setup(x => x.CurrentStore).Returns(new Store { Id = 1 }); _addressService = new Mock <IAddressService>(); //default tax address _addressService.Setup(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Returns(new Address { Id = _taxSettings.DefaultTaxAddressId }); _eventPublisher = new Mock <IEventPublisher>(); _eventPublisher.Setup(x => x.Publish(It.IsAny <object>())); _geoLookupService = new Mock <IGeoLookupService>(); _countryService = new Mock <ICountryService>(); _customerRoleRepo = new FakeRepository <CustomerRole>(new List <CustomerRole> { new CustomerRole { Id = 1, TaxExempt = true, Active = true } }); _customerCustomerRoleMappingRepo = new FakeRepository <CustomerCustomerRoleMapping>(); _stateProvinceService = new Mock <IStateProvinceService>(); _logger = new Mock <ILogger>(); _webHelper = new Mock <IWebHelper>(); _genericAttributeService = new Mock <IGenericAttributeService>(); _customerSettings = new CustomerSettings(); _shippingSettings = new ShippingSettings(); _addressSettings = new AddressSettings(); _customerService = new CustomerService(new CustomerSettings(), _genericAttributeService.Object, null, null, null, _customerCustomerRoleMappingRepo, null, _customerRoleRepo, null, null, new TestCacheManager(), _storeContext.Object, null); var pluginService = new FakePluginService(); _taxPluginManager = new TaxPluginManager(_customerService, pluginService, _taxSettings); _taxService = new TaxService(_addressSettings, _customerSettings, _addressService.Object, _countryService.Object, _customerService, _eventPublisher.Object, _genericAttributeService.Object, _geoLookupService.Object, _logger.Object, _stateProvinceService.Object, _storeContext.Object, _taxPluginManager, _webHelper.Object, _workContext, _shippingSettings, _taxSettings); }
public TaxCodesViewComponent(IPermissionService permissionService, ITaxPluginManager taxPluginManager) { _permissionService = permissionService; _taxPluginManager = taxPluginManager; }