public new void SetUp() 
 {
     _securitySettings = new SecuritySettings()
     {
         EncryptionKey = "273ece6f97dd844d"
     };
     _encryptionService = new EncryptionService(_securitySettings);
 }
Esempio n. 2
0
 public SitemapGenerator(IStoreContext storeContext,
     ICategoryService categoryService,
     IProductService productService,
     IManufacturerService manufacturerService,
     ITopicService topicService,
     CommonSettings commonSettings,
     BlogSettings blogSettings,
     NewsSettings newsSettings,
     ForumSettings forumSettings,
     SecuritySettings securitySettings)
 {
     this._storeContext = storeContext;
     this._categoryService = categoryService;
     this._productService = productService;
     this._manufacturerService = manufacturerService;
     this._topicService = topicService;
     this._commonSettings = commonSettings;
     this._blogSettings = blogSettings;
     this._newsSettings = newsSettings;
     this._forumSettings = forumSettings;
     this._securitySettings = securitySettings;
 }
Esempio n. 3
0
 public EncryptionService(SecuritySettings securitySettings)
 {
     this._securitySettings = securitySettings;
 }
 public CustomerController(IAuthenticationService authenticationService,
     IDateTimeHelper dateTimeHelper,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     ICustomerService customerService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService,
     ITaxService taxService,
     RewardPointsSettings rewardPointsSettings,
     CustomerSettings customerSettings,
     AddressSettings addressSettings,
     ForumSettings forumSettings,
     OrderSettings orderSettings,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IOrderService orderService,
     IPictureService pictureService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IShoppingCartService shoppingCartService,
     IOpenAuthenticationService openAuthenticationService,
     IDownloadService downloadService,
     IWebHelper webHelper,
     ICustomerActivityService customerActivityService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IReturnRequestService returnRequestService,
     IEventPublisher eventPublisher,
     MediaSettings mediaSettings,
     IWorkflowMessageService workflowMessageService,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     SecuritySettings securitySettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     StoreInformationSettings storeInformationSettings)
 {
     this._authenticationService = authenticationService;
     this._dateTimeHelper = dateTimeHelper;
     this._dateTimeSettings = dateTimeSettings;
     this._taxSettings = taxSettings;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._storeMappingService = storeMappingService;
     this._customerService = customerService;
     this._customerAttributeParser = customerAttributeParser;
     this._customerAttributeService = customerAttributeService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._taxService = taxService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
     this._addressSettings = addressSettings;
     this._forumSettings = forumSettings;
     this._orderSettings = orderSettings;
     this._addressService = addressService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._orderService = orderService;
     this._pictureService = pictureService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._shoppingCartService = shoppingCartService;
     this._openAuthenticationService = openAuthenticationService;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
     this._customerActivityService = customerActivityService;
     this._addressAttributeParser = addressAttributeParser;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._returnRequestService = returnRequestService;
     this._eventPublisher = eventPublisher;
     this._mediaSettings = mediaSettings;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
     this._captchaSettings = captchaSettings;
     this._securitySettings = securitySettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._storeInformationSettings = storeInformationSettings;
 }
Esempio n. 5
0
        public SettingController(ISettingService settingService,
            ICountryService countryService, IStateProvinceService stateProvinceService,
            IAddressService addressService, ITaxCategoryService taxCategoryService,
            ICurrencyService currencyService, IPictureService pictureService, 
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IOrderService orderService, IEncryptionService encryptionService,
            IThemeProvider themeProvider, ICustomerService customerService, 
            ICustomerActivityService customerActivityService, IPermissionService permissionService,
            IWebHelper webHelper, IFulltextService fulltextService,
            BlogSettings blogSettings,
            ForumSettings forumSettings, NewsSettings newsSettings,
            ShippingSettings shippingSettings, TaxSettings taxSettings,
            CatalogSettings catalogSettings, RewardPointsSettings rewardPointsSettings,
            CurrencySettings currencySettings, OrderSettings orderSettings,
            ShoppingCartSettings shoppingCartSettings, MediaSettings mediaSettings,
            CustomerSettings customerSettings,
            DateTimeSettings dateTimeSettings, StoreInformationSettings storeInformationSettings,
            SeoSettings seoSettings,SecuritySettings securitySettings, PdfSettings pdfSettings,
            LocalizationSettings localizationSettings, AdminAreaSettings adminAreaSettings,
            CaptchaSettings captchaSettings, ExternalAuthenticationSettings externalAuthenticationSettings,
            CommonSettings commonSettings)
        {
            this._settingService = settingService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._addressService = addressService;
            this._taxCategoryService = taxCategoryService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._orderService = orderService;
            this._encryptionService = encryptionService;
            this._themeProvider = themeProvider;
            this._customerService = customerService;
            this._customerActivityService = customerActivityService;
            this._permissionService = permissionService;
            this._webHelper = webHelper;
            this._fulltextService = fulltextService;

            this._blogSettings = blogSettings;
            this._forumSettings = forumSettings;
            this._newsSettings = newsSettings;
            this._shippingSettings = shippingSettings;
            this._taxSettings = taxSettings;
            this._catalogSettings = catalogSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._currencySettings = currencySettings;
            this._orderSettings = orderSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._mediaSettings = mediaSettings;
            this._customerSettings = customerSettings;
            this._dateTimeSettings = dateTimeSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._seoSettings = seoSettings;
            this._securitySettings = securitySettings;
            this._pdfSettings = pdfSettings;
            this._localizationSettings = localizationSettings;
            this._adminAreaSettings = adminAreaSettings;
            this._captchaSettings = captchaSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
            this._commonSettings = commonSettings;
        }
        public new void SetUp()
        {
            _customerSettings = new CustomerSettings();
            _securitySettings = new SecuritySettings()
            {
                EncryptionKey = "273ece6f97dd844d"
            };
            _rewardPointsSettings = new RewardPointsSettings()
            {
                Enabled = false,
            };

            _encryptionService = new EncryptionService(_securitySettings);
            _customerRepo = MockRepository.GenerateMock<IRepository<Customer>>();
            var customer1 = new Customer()
            {
                Username = "******",
                Email = "*****@*****.**",
                PasswordFormat = PasswordFormat.Hashed,
                Active = true
            };

            string saltKey = _encryptionService.CreateSaltKey(5);
            string password = _encryptionService.CreatePasswordHash("password", saltKey);
            customer1.PasswordSalt = saltKey;
            customer1.Password = password;
            AddCustomerToRegisteredRole(customer1);

            var customer2 = new Customer()
            {
                Username = "******",
                Email = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password = "******",
                Active = true
            };
            AddCustomerToRegisteredRole(customer2);

            var customer3 = new Customer()
            {
                Username = "******",
                Email = "*****@*****.**",
                PasswordFormat = PasswordFormat.Encrypted,
                Password = _encryptionService.EncryptText("password"),
                Active = true
            };
            AddCustomerToRegisteredRole(customer3);

            var customer4 = new Customer()
            {
                Username = "******",
                Email = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password = "******",
                Active = true
            };
            AddCustomerToRegisteredRole(customer4);

            var customer5 = new Customer()
            {
                Username = "******",
                Email = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password = "******",
                Active = true
            };

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

            _customerRepo.Expect(x => x.Table).Return(new List<Customer>() { customer1, customer2, customer3, customer4, customer5 }.AsQueryable());

            _customerRoleRepo = MockRepository.GenerateMock<IRepository<CustomerRole>>();
            _genericAttributeRepo = MockRepository.GenerateMock<IRepository<GenericAttribute>>();

            _genericAttributeService = MockRepository.GenerateMock<IGenericAttributeService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock<INewsLetterSubscriptionService>();

            _localizationService = MockRepository.GenerateMock<ILocalizationService>();
            _customerService = new CustomerService(new NopNullCache(), _customerRepo, _customerRoleRepo,
                _genericAttributeRepo, _genericAttributeService, _eventPublisher, _customerSettings);
            _customerRegistrationService = new CustomerRegistrationService(_customerService,
                _encryptionService, _newsLetterSubscriptionService, _localizationService,
                _rewardPointsSettings, _customerSettings);
        }
 public AccountController(IAuthenticationService authenticationService,
     IDateTimeHelper dateTimeHelper,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     ICustomerService customerService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService,
     ITaxService taxService,
     RewardPointsSettings rewardPointsSettings,
     CustomerSettings customerSettings,
     AddressSettings addressSettings,
     ForumSettings forumSettings,
     OrderSettings orderSettings,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IOrderService orderService,
     IPictureService pictureService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IShoppingCartService shoppingCartService,
     IOpenAuthenticationService openAuthenticationService,
     IDownloadService downloadService,
     IWebHelper webHelper,
     ICustomerActivityService customerActivityService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     MediaSettings mediaSettings,
     IWorkflowMessageService workflowMessageService,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     SecuritySettings securitySettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IMultitenantService vendorService,
     IGroupDealService groupDealService,
     ICategoryService categoryService,
     IVendorAddressService vendorAddressService,
     IProductService productService,
     IStoreService storeService,
     StoreInformationSettings storeInformationSettings)
 {
     this._authenticationService = authenticationService;
     this._dateTimeHelper = dateTimeHelper;
     this._dateTimeSettings = dateTimeSettings;
     this._taxSettings = taxSettings;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._storeMappingService = storeMappingService;
     this._customerService = customerService;
     this._customerAttributeParser = customerAttributeParser;
     this._customerAttributeService = customerAttributeService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._taxService = taxService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
     this._addressSettings = addressSettings;
     this._forumSettings = forumSettings;
     this._orderSettings = orderSettings;
     this._addressService = addressService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._orderService = orderService;
     this._pictureService = pictureService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._shoppingCartService = shoppingCartService;
     this._openAuthenticationService = openAuthenticationService;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
     this._customerActivityService = customerActivityService;
     this._addressAttributeParser = addressAttributeParser;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._mediaSettings = mediaSettings;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings = localizationSettings;
     this._captchaSettings = captchaSettings;
     this._securitySettings = securitySettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._categories = new System.Collections.Generic.List<DTOs.Category>();
     this._vendorService = vendorService;
     this._groupDealService = groupDealService;
     this._categoryService = categoryService;
     this._vendorAddressService = vendorAddressService;
     this._productService = productService;
     this._storeService = storeService;
     this._storeInformationSettings = storeInformationSettings;
 }