public CustomerActionViewModelService(ICustomerService customerService,
                                       ICustomerTagService customerTagService,
                                       ILocalizationService localizationService,
                                       ICustomerActivityService customerActivityService,
                                       ICategoryService categoryService,
                                       IManufacturerService manufacturerService,
                                       IStoreService storeService,
                                       IVendorService vendorService,
                                       ICustomerActionService customerActionService,
                                       IProductAttributeService productAttributeService,
                                       IBannerService bannerService,
                                       IInteractiveFormService interactiveFormService,
                                       IMessageTemplateService messageTemplateService,
                                       IDateTimeHelper dateTimeHelper,
                                       IProductService productService)
 {
     _customerService         = customerService;
     _customerTagService      = customerTagService;
     _localizationService     = localizationService;
     _customerActivityService = customerActivityService;
     _categoryService         = categoryService;
     _manufacturerService     = manufacturerService;
     _storeService            = storeService;
     _vendorService           = vendorService;
     _customerActionService   = customerActionService;
     _bannerService           = bannerService;
     _interactiveFormService  = interactiveFormService;
     _messageTemplateService  = messageTemplateService;
     _dateTimeHelper          = dateTimeHelper;
     _productService          = productService;
 }
 public CustomerActionController(
     ICustomerActionViewModelService customerActionViewModelService,
     ICustomerService customerService,
     ICustomerAttributeService customerAttributeService,
     ICustomerTagService customerTagService,
     ILocalizationService localizationService,
     ICustomerActivityService customerActivityService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IVendorService vendorService,
     ICustomerActionService customerActionService,
     IProductAttributeService productAttributeService,
     ISpecificationAttributeService specificationAttributeService,
     IDateTimeHelper dateTimeHelper)
 {
     _customerActionViewModelService = customerActionViewModelService;
     _customerService = customerService;
     _customerAttributeService = customerAttributeService;
     _customerTagService = customerTagService;
     _localizationService = localizationService;
     _customerActivityService = customerActivityService;
     _productService = productService;
     _categoryService = categoryService;
     _manufacturerService = manufacturerService;
     _storeService = storeService;
     _vendorService = vendorService;
     _customerActionService = customerActionService;
     _productAttributeService = productAttributeService;
     _specificationAttributeService = specificationAttributeService;
     _dateTimeHelper = dateTimeHelper;
 }
Exemplo n.º 3
0
 public CustomerActionController(
     ICustomerActionViewModelService customerActionViewModelService,
     ICustomerService customerService,
     ICustomerAttributeService customerAttributeService,
     ICustomerTagService customerTagService,
     ILocalizationService localizationService,
     ICustomerActivityService customerActivityService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IVendorService vendorService,
     ICustomerActionService customerActionService,
     IProductAttributeService productAttributeService,
     ISpecificationAttributeService specificationAttributeService)
 {
     this._customerActionViewModelService = customerActionViewModelService;
     this._customerService               = customerService;
     this._customerAttributeService      = customerAttributeService;
     this._customerTagService            = customerTagService;
     this._localizationService           = localizationService;
     this._customerActivityService       = customerActivityService;
     this._productService                = productService;
     this._categoryService               = categoryService;
     this._manufacturerService           = manufacturerService;
     this._storeService                  = storeService;
     this._vendorService                 = vendorService;
     this._customerActionService         = customerActionService;
     this._productAttributeService       = productAttributeService;
     this._specificationAttributeService = specificationAttributeService;
 }
 public CustomerActionController(
     ICustomerActionViewModelService customerActionViewModelService,
     ICustomerService customerService,
     IGroupService groupService,
     ICustomerAttributeService customerAttributeService,
     ICustomerTagService customerTagService,
     ITranslationService translationService,
     ICustomerActivityService customerActivityService,
     IProductService productService,
     ICategoryService categoryService,
     ICollectionService collectionService,
     IStoreService storeService,
     IVendorService vendorService,
     ICustomerActionService customerActionService,
     IProductAttributeService productAttributeService,
     ISpecificationAttributeService specificationAttributeService,
     IDateTimeService dateTimeService)
 {
     _customerActionViewModelService = customerActionViewModelService;
     _customerService               = customerService;
     _groupService                  = groupService;
     _customerAttributeService      = customerAttributeService;
     _customerTagService            = customerTagService;
     _translationService            = translationService;
     _customerActivityService       = customerActivityService;
     _productService                = productService;
     _categoryService               = categoryService;
     _collectionService             = collectionService;
     _storeService                  = storeService;
     _vendorService                 = vendorService;
     _customerActionService         = customerActionService;
     _productAttributeService       = productAttributeService;
     _specificationAttributeService = specificationAttributeService;
     _dateTimeService               = dateTimeService;
 }
 public CustomerActionViewModelService(ICustomerService customerService,
                                       IGroupService groupService,
                                       ICustomerTagService customerTagService,
                                       ITranslationService translationService,
                                       ICustomerActivityService customerActivityService,
                                       IStoreService storeService,
                                       IVendorService vendorService,
                                       ICustomerActionService customerActionService,
                                       IBannerService bannerService,
                                       IInteractiveFormService interactiveFormService,
                                       IMessageTemplateService messageTemplateService,
                                       IDateTimeService dateTimeService,
                                       IProductService productService)
 {
     _customerService         = customerService;
     _groupService            = groupService;
     _customerTagService      = customerTagService;
     _translationService      = translationService;
     _customerActivityService = customerActivityService;
     _storeService            = storeService;
     _vendorService           = vendorService;
     _customerActionService   = customerActionService;
     _bannerService           = bannerService;
     _interactiveFormService  = interactiveFormService;
     _messageTemplateService  = messageTemplateService;
     _dateTimeService         = dateTimeService;
     _productService          = productService;
 }
 public CustomerActionTypeController(
     ILocalizationService localizationService,
     ICustomerActionService customerActionService
     )
 {
     _customerActionService = customerActionService;
     _localizationService   = localizationService;
 }
Exemplo n.º 7
0
 public CustomerActionTypeController(
     ITranslationService translationService,
     ICustomerActionService customerActionService
     )
 {
     _customerActionService = customerActionService;
     _translationService    = translationService;
 }
 public CustomerActionTypeController(
     IPermissionService permissionService,
     ILocalizationService localizationService,
     ICustomerActionService customerActionService
     )
 {
     this._customerActionService = customerActionService;
     this._permissionService     = permissionService;
     this._localizationService   = localizationService;
 }
        public void TestInitialize()
        {
            var eventPublisher = new Mock <IEventPublisher>();

            eventPublisher.Setup(x => x.Publish(new object()));
            _eventPublisher = eventPublisher.Object;

            _customerActionRepository        = new MongoDBRepositoryTest <CustomerAction>();
            _customerActionTypeRepository    = new MongoDBRepositoryTest <CustomerActionType>();
            _customerActionHistoryRepository = new MongoDBRepositoryTest <CustomerActionHistory>();

            _Id_CustomerActionType = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            var customerActionType = new List <CustomerActionType>()
            {
                new CustomerActionType()
                {
                    Id            = _Id_CustomerActionType,
                    Name          = "Add to cart",
                    SystemKeyword = "AddToCart",
                    Enabled       = true,
                    ConditionType = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
                },
                new CustomerActionType()
                {
                    Name          = "Add order",
                    SystemKeyword = "AddOrder",
                    Enabled       = true,
                    ConditionType = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
                },
                new CustomerActionType()
                {
                    Name          = "Viewed",
                    SystemKeyword = "Viewed",
                    Enabled       = false,
                    ConditionType = { 1, 2, 3, 7, 8, 9, 10 }
                },
                new CustomerActionType()
                {
                    Name          = "Url",
                    SystemKeyword = "Url",
                    Enabled       = false,
                    ConditionType = { 7, 8, 9, 10, 11, 12 }
                },
                new CustomerActionType()
                {
                    Name          = "Customer Registration",
                    SystemKeyword = "Registration",
                    Enabled       = false,
                    ConditionType = { 7, 8, 9, 10 }
                }
            };

            _customerActionTypeRepository.Insert(customerActionType);
            _Id_CustomerAction = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            var customerActions = new List <CustomerAction>()
            {
                new CustomerAction()
                {
                    Id               = _Id_CustomerAction,
                    Active           = true,
                    StartDateTimeUtc = DateTime.UtcNow,
                    EndDateTimeUtc   = DateTime.UtcNow.AddMonths(1),
                    Name             = "Test action",
                    ReactionTypeId   = (int)CustomerReactionTypeEnum.AssignToCustomerTag,
                    Condition        = CustomerActionConditionEnum.OneOfThem,
                    ActionTypeId     = _Id_CustomerActionType
                },
            };

            _customerActionRepository.Insert(customerActions);
            _customerActionService = new CustomerActionService(_customerActionRepository, _customerActionTypeRepository,
                                                               _customerActionHistoryRepository, _eventPublisher, new TestMemoryCacheManager(new Mock <IMemoryCache>().Object));
        }