public CustomerModelFactory(AddressSettings addressSettings,
                             CaptchaSettings captchaSettings,
                             CatalogSettings catalogSettings,
                             CommonSettings commonSettings,
                             CustomerSettings customerSettings,
                             DateTimeSettings dateTimeSettings,
                             ExternalAuthenticationSettings externalAuthenticationSettings,
                             ForumSettings forumSettings,
                             GdprSettings gdprSettings,
                             IAddressModelFactory addressModelFactory,
                             ICountryService countryService,
                             ICustomerAttributeParser customerAttributeParser,
                             ICustomerAttributeService customerAttributeService,
                             IDateTimeHelper dateTimeHelper,
                             IDownloadService downloadService,
                             IExternalAuthenticationService externalAuthenticationService,
                             IGdprService gdprService,
                             IGenericAttributeService genericAttributeService,
                             ILocalizationService localizationService,
                             INewsLetterSubscriptionService newsLetterSubscriptionService,
                             IPictureService pictureService,
                             IStateProvinceService stateProvinceService,
                             IStoreContext storeContext,
                             IStoreMappingService storeMappingService,
                             IUrlRecordService urlRecordService,
                             IWorkContext workContext,
                             MediaSettings mediaSettings,
                             SecuritySettings securitySettings,
                             VendorSettings vendorSettings)
 {
     this._addressSettings  = addressSettings;
     this._captchaSettings  = captchaSettings;
     this._catalogSettings  = catalogSettings;
     this._commonSettings   = commonSettings;
     this._customerSettings = customerSettings;
     this._dateTimeSettings = dateTimeSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._forumSettings                 = forumSettings;
     this._gdprSettings                  = gdprSettings;
     this._addressModelFactory           = addressModelFactory;
     this._countryService                = countryService;
     this._customerAttributeParser       = customerAttributeParser;
     this._customerAttributeService      = customerAttributeService;
     this._dateTimeHelper                = dateTimeHelper;
     this._downloadService               = downloadService;
     this._externalAuthenticationService = externalAuthenticationService;
     this._gdprService                   = gdprService;
     this._genericAttributeService       = genericAttributeService;
     this._localizationService           = localizationService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._pictureService                = pictureService;
     this._stateProvinceService          = stateProvinceService;
     this._storeContext                  = storeContext;
     this._storeMappingService           = storeMappingService;
     this._urlRecordService              = urlRecordService;
     this._workContext                   = workContext;
     this._mediaSettings                 = mediaSettings;
     this._securitySettings              = securitySettings;
     this._vendorSettings                = vendorSettings;
 }
Beispiel #2
0
 public void Setup()
 {
     _gdprService         = Resolve <IGdprService>();
     _userService         = Resolve <IUserService>();
     _consentService      = Resolve <IConsentService>();
     _consentGroupService = Resolve <IConsentGroupService>();
 }
Beispiel #3
0
 public CustomerModelFactory(AddressSettings addressSettings,
                             CustomerSettings customerSettings,
                             DateTimeSettings dateTimeSettings,
                             GdprSettings gdprSettings,
                             IAclSupportedModelFactory aclSupportedModelFactory,
                             IAddressAttributeFormatter addressAttributeFormatter,
                             IAddressAttributeModelFactory addressAttributeModelFactory,
                             IBaseAdminModelFactory baseAdminModelFactory,
                             ICustomerActivityService customerActivityService,
                             ICustomerAttributeParser customerAttributeParser,
                             ICustomerAttributeService customerAttributeService,
                             ICustomerService customerService,
                             IDateTimeHelper dateTimeHelper,
                             IExternalAuthenticationService externalAuthenticationService,
                             IGdprService gdprService,
                             IGenericAttributeService genericAttributeService,
                             IGeoLookupService geoLookupService,
                             ILocalizationService localizationService,
                             INewsLetterSubscriptionService newsLetterSubscriptionService,
                             IPictureService pictureService,
                             IPriceCalculationService priceCalculationService,
                             IPriceFormatter priceFormatter,
                             IStoreContext storeContext,
                             IStoreService storeService,
                             MediaSettings mediaSettings,
                             TaxSettings taxSettings)
 {
     this._addressSettings               = addressSettings;
     this._customerSettings              = customerSettings;
     this._dateTimeSettings              = dateTimeSettings;
     this._gdprSettings                  = gdprSettings;
     this._aclSupportedModelFactory      = aclSupportedModelFactory;
     this._addressAttributeFormatter     = addressAttributeFormatter;
     this._addressAttributeModelFactory  = addressAttributeModelFactory;
     this._baseAdminModelFactory         = baseAdminModelFactory;
     this._customerActivityService       = customerActivityService;
     this._customerAttributeParser       = customerAttributeParser;
     this._customerAttributeService      = customerAttributeService;
     this._customerService               = customerService;
     this._dateTimeHelper                = dateTimeHelper;
     this._externalAuthenticationService = externalAuthenticationService;
     this._gdprService                   = gdprService;
     this._genericAttributeService       = genericAttributeService;
     this._geoLookupService              = geoLookupService;
     this._localizationService           = localizationService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._pictureService                = pictureService;
     this._priceCalculationService       = priceCalculationService;
     this._priceFormatter                = priceFormatter;
     this._storeContext                  = storeContext;
     this._storeService                  = storeService;
     this._mediaSettings                 = mediaSettings;
     this._taxSettings                   = taxSettings;
 }
 public AuthenticationController(IAppAuthenticationService appAuthenticationService, UserSettings userSettings, SecuritySettings securitySettings, IUserRegistrationService userRegistrationService, IRoleService roleService, IUserService userService, ICryptographyService cryptographyService, IUserCodeService userCodeService, IPreviousPasswordService previousPasswordService, IConsentService consentService, IGdprService gdprService, IGdprModelFactory gdprModelFactory, IInviteRequestService inviteRequestService, AffiliateSettings affiliateSettings)
 {
     _appAuthenticationService = appAuthenticationService;
     _userSettings             = userSettings;
     _securitySettings         = securitySettings;
     _userRegistrationService  = userRegistrationService;
     _roleService             = roleService;
     _userService             = userService;
     _cryptographyService     = cryptographyService;
     _userCodeService         = userCodeService;
     _previousPasswordService = previousPasswordService;
     _consentService          = consentService;
     _gdprService             = gdprService;
     _gdprModelFactory        = gdprModelFactory;
     _inviteRequestService    = inviteRequestService;
     _affiliateSettings       = affiliateSettings;
 }
Beispiel #5
0
 public void SetUp()
 {
     _gdprService = GetService <IGdprService>();
 }
 public CustomerModelFactory(AddressSettings addressSettings,
                             CaptchaSettings captchaSettings,
                             CatalogSettings catalogSettings,
                             CommonSettings commonSettings,
                             CustomerSettings customerSettings,
                             DateTimeSettings dateTimeSettings,
                             ExternalAuthenticationSettings externalAuthenticationSettings,
                             ForumSettings forumSettings,
                             GdprSettings gdprSettings,
                             IAddressModelFactory addressModelFactory,
                             IAuthenticationPluginManager authenticationPluginManager,
                             ICountryService countryService,
                             ICustomerAttributeParser customerAttributeParser,
                             ICustomerAttributeService customerAttributeService,
                             IDateTimeHelper dateTimeHelper,
                             IDownloadService downloadService,
                             IGdprService gdprService,
                             IGenericAttributeService genericAttributeService,
                             ILocalizationService localizationService,
                             INewsLetterSubscriptionService newsLetterSubscriptionService,
                             IOrderService orderService,
                             IPictureService pictureService,
                             IReturnRequestService returnRequestService,
                             IStateProvinceService stateProvinceService,
                             IStoreContext storeContext,
                             IStoreMappingService storeMappingService,
                             IUrlRecordService urlRecordService,
                             IWorkContext workContext,
                             MediaSettings mediaSettings,
                             OrderSettings orderSettings,
                             RewardPointsSettings rewardPointsSettings,
                             SecuritySettings securitySettings,
                             TaxSettings taxSettings,
                             VendorSettings vendorSettings)
 {
     _addressSettings  = addressSettings;
     _captchaSettings  = captchaSettings;
     _catalogSettings  = catalogSettings;
     _commonSettings   = commonSettings;
     _customerSettings = customerSettings;
     _dateTimeSettings = dateTimeSettings;
     _externalAuthenticationSettings = externalAuthenticationSettings;
     _forumSettings               = forumSettings;
     _gdprSettings                = gdprSettings;
     _addressModelFactory         = addressModelFactory;
     _authenticationPluginManager = authenticationPluginManager;
     _countryService              = countryService;
     _customerAttributeParser     = customerAttributeParser;
     _customerAttributeService    = customerAttributeService;
     _dateTimeHelper              = dateTimeHelper;
     _downloadService             = downloadService;
     _gdprService                   = gdprService;
     _genericAttributeService       = genericAttributeService;
     _localizationService           = localizationService;
     _newsLetterSubscriptionService = newsLetterSubscriptionService;
     _orderService                  = orderService;
     _pictureService                = pictureService;
     _returnRequestService          = returnRequestService;
     _stateProvinceService          = stateProvinceService;
     _storeContext                  = storeContext;
     _storeMappingService           = storeMappingService;
     _urlRecordService              = urlRecordService;
     _workContext                   = workContext;
     _mediaSettings                 = mediaSettings;
     _orderSettings                 = orderSettings;
     _rewardPointsSettings          = rewardPointsSettings;
     _securitySettings              = securitySettings;
     _taxSettings                   = taxSettings;
     _vendorSettings                = vendorSettings;
 }
Beispiel #7
0
 public RawHtmlWidget(IWidgetService widgetService, IGdprService gdprService, IConsentService consentService)
 {
     _widgetService  = widgetService;
     _gdprService    = gdprService;
     _consentService = consentService;
 }
Beispiel #8
0
 public GdprController(IGdprService gdprService, IConsentService consentService, IGdprModelFactory gdprModelFactory)
 {
     _gdprService      = gdprService;
     _consentService   = consentService;
     _gdprModelFactory = gdprModelFactory;
 }
Beispiel #9
0
 public GdprController(IGdprService accountService)
 {
     _gdprService = accountService;
 }
Beispiel #10
0
        public new void SetUp()
        {
            _pictureService                = MockRepository.GenerateMock <IPictureService>();
            _authenticationService         = MockRepository.GenerateMock <IAuthenticationService>();
            _localizationService           = MockRepository.GenerateMock <ILocalizationService>();
            _workContext                   = MockRepository.GenerateMock <IWorkContext>();
            _vendorService                 = MockRepository.GenerateMock <IVendorService>();
            _productTemplateService        = MockRepository.GenerateMock <IProductTemplateService>();
            _dateRangeService              = MockRepository.GenerateMock <IDateRangeService>();
            _genericAttributeService       = MockRepository.GenerateMock <IGenericAttributeService>();
            _storeService                  = MockRepository.GenerateMock <IStoreService>();
            _productAttributeService       = MockRepository.GenerateMock <IProductAttributeService>();
            _productTagService             = MockRepository.GenerateMock <IProductTagService>();
            _taxCategoryService            = MockRepository.GenerateMock <ITaxCategoryService>();
            _measureService                = MockRepository.GenerateMock <IMeasureService>();
            _catalogSettings               = new CatalogSettings();
            _specificationAttributeService = MockRepository.GenerateMock <ISpecificationAttributeService>();
            _orderSettings                 = new OrderSettings();
            _categoryService               = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService           = MockRepository.GenerateMock <IManufacturerService>();
            _customerService               = MockRepository.GenerateMock <ICustomerService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();
            _productEditorSettings         = new ProductEditorSettings();
            _customerAttributeFormatter    = MockRepository.GenerateMock <ICustomerAttributeFormatter>();

            _orderService         = MockRepository.GenerateMock <IOrderService>();
            _countryService       = MockRepository.GenerateMock <ICountryService>();
            _stateProvinceService = MockRepository.GenerateMock <IStateProvinceService>();
            _priceFormatter       = MockRepository.GenerateMock <IPriceFormatter>();
            _forumSettings        = new ForumSettings();
            _forumService         = MockRepository.GenerateMock <IForumService>();
            _gdprService          = MockRepository.GenerateMock <IGdprService>();
            _customerSettings     = MockRepository.GenerateMock <CustomerSettings>();
            _dateTimeHelper       = MockRepository.GenerateMock <IDateTimeHelper>();
            _addressSettings      = new AddressSettings();
            _currencyService      = MockRepository.GenerateMock <ICurrencyService>();

            var httpContextAccessor = MockRepository.GenerateMock <IHttpContextAccessor>();
            var nopEngine           = MockRepository.GenerateMock <NopEngine>();
            var serviceProvider     = MockRepository.GenerateMock <IServiceProvider>();
            var urlRecordService    = MockRepository.GenerateMock <IUrlRecordService>();
            var picture             = new Picture
            {
                Id          = 1,
                SeoFilename = "picture"
            };

            _genericAttributeService.Expect(p => p.GetAttributesForEntity(1, "Customer"))
            .Return(new List <GenericAttribute>
            {
                new GenericAttribute
                {
                    EntityId = 1,
                    Key      = "manufacturer-advanced-mode",
                    KeyGroup = "Customer",
                    StoreId  = 0,
                    Value    = "true"
                }
            });
            _authenticationService.Expect(p => p.GetAuthenticatedCustomer()).Return(GetTestCustomer());
            _pictureService.Expect(p => p.GetPictureById(1)).Return(picture);
            _pictureService.Expect(p => p.GetThumbLocalPath(picture)).Return(@"c:\temp\picture.png");
            _pictureService.Expect(p => p.GetPicturesByProductId(1, 3)).Return(new List <Picture> {
                picture
            });
            _productTemplateService.Expect(p => p.GetAllProductTemplates()).Return(new List <ProductTemplate> {
                new ProductTemplate {
                    Id = 1
                }
            });
            _dateRangeService.Expect(d => d.GetAllDeliveryDates()).Return(new List <DeliveryDate> {
                new DeliveryDate {
                    Id = 1
                }
            });
            _dateRangeService.Expect(d => d.GetAllProductAvailabilityRanges()).Return(new List <ProductAvailabilityRange> {
                new ProductAvailabilityRange {
                    Id = 1
                }
            });
            _taxCategoryService.Expect(t => t.GetAllTaxCategories()).Return(new List <TaxCategory> {
                new TaxCategory()
            });
            _vendorService.Expect(v => v.GetAllVendors(showHidden: true)).Return(new PagedList <Vendor>(new List <Vendor> {
                new Vendor {
                    Id = 1
                }
            }, 0, 10));
            _measureService.Expect(m => m.GetAllMeasureWeights()).Return(new List <MeasureWeight> {
                new MeasureWeight()
            });
            _categoryService.Expect(c => c.GetProductCategoriesByProductId(1, true)).Return(new List <ProductCategory>());
            _manufacturerService.Expect(m => m.GetProductManufacturersByProductId(1, true)).Return(new List <ProductManufacturer>());

            nopEngine.Expect(x => x.ServiceProvider).Return(serviceProvider);
            serviceProvider.Expect(x => x.GetRequiredService(typeof(IGenericAttributeService))).Return(_genericAttributeService);
            serviceProvider.Expect(x => x.GetRequiredService(typeof(IUrlRecordService))).Return(urlRecordService);
            serviceProvider.Expect(x => x.GetRequiredService(typeof(ILocalizationService))).Return(_localizationService);
            serviceProvider.Expect(x => x.GetRequiredService(typeof(IWorkContext))).Return(_workContext);
            serviceProvider.Expect(x => x.GetRequiredService(typeof(IHttpContextAccessor))).Return(httpContextAccessor);

            EngineContext.Replace(nopEngine);
            _exportManager = new ExportManager(_categoryService, _manufacturerService, _customerService, _productAttributeService, _productTagService, _pictureService, _newsLetterSubscriptionService, _storeService, _workContext, _productEditorSettings, _vendorService, _productTemplateService, _dateRangeService, _taxCategoryService, _measureService, _catalogSettings, _genericAttributeService, _customerAttributeFormatter, _orderSettings, _specificationAttributeService, _orderService, _countryService, _stateProvinceService, _priceFormatter, _forumSettings, _forumService, _gdprService, _customerSettings, _localizationService, _dateTimeHelper, _addressSettings, _currencyService);
        }