public NotificationService(IRepository <Notification> notificationRepository, IContactService contactService, IContactGroupService contactGroupService, INotificationTemplateService notificationTemplateService) { _notificationRepository = notificationRepository; _contactGroupService = contactGroupService; _notificationTemplateService = notificationTemplateService; _contactService = contactService; }
public NotificationsController( INotificationTemplateService notificationTemplateService, INotificationManager notificationManager, INotificationTemplateResolver eventTemplateResolver) { _notificationTemplateService = notificationTemplateService; _notificationManager = notificationManager; _eventTemplateResolver = eventTemplateResolver; }
public NotificationsController( INotificationTemplateService notificationTemplateService, INotificationManager notificationManager, INotificationTemplateResolver notificationTemplateResolver) { _notificationTemplateService = notificationTemplateService; _notificationManager = notificationManager; _notificationTemplateResolver = notificationTemplateResolver; }
public PlatformExportImportManager(ISecurityService securityService, IRoleManagementService roleManagementService, ISettingsManager settingsManager, IDynamicPropertyService dynamicPropertyService, IModuleCatalog moduleCatalog, ICacheManager <object> cacheManager, INotificationTemplateService notificationTemplateService) { _dynamicPropertyService = dynamicPropertyService; _securityService = securityService; _roleManagementService = roleManagementService; _settingsManager = settingsManager; _moduleCatalog = moduleCatalog; _cacheManager = cacheManager; _notificationTemplateService = notificationTemplateService; _manifestPartUri = PackUriHelper.CreatePartUri(new Uri("Manifest.json", UriKind.Relative)); _platformEntriesPartUri = PackUriHelper.CreatePartUri(new Uri("PlatformEntries.json", UriKind.Relative)); }
internal NotificationTemplateData RetrieveTemplateByType(NotificationTypes type) { ArgumentValidator.IsNotNull("type", type); INotificationTemplateService service = UnitOfWork.GetService <INotificationTemplateService>(); var query = service.RetrieveByType(type); if (query.HasResult) { return(query.DataList.First()); } return(null); }
public NotificationController( IHubContext <NotificationHub, ITypedHubClient> hubContext, INotificationService notificationService, INotificationTemplateService notificationTemplateService, IIdentityService identityService, ILoyaltySyncService loyaltySyncService, IMapper mapper) { _hubContext = hubContext; _notificationService = notificationService; _notificationTemplateService = notificationTemplateService; _identityService = identityService; _loyaltySyncService = loyaltySyncService; _mapper = mapper; }
public void FindNotificationTemplateById_Service_Success() { // Arrange notificationTemplateService = new NotificationTemplateService(mockRepository.Object, mockLogger.Object, mockCache.Object, mockTelemetry.Object); mockRepository.Setup(x => x.FindById <NotificationTemplate>(It.IsAny <int>())).Returns(new NotificationTemplate()).Verifiable(); // Act var response = notificationTemplateService.FindNotificationTemplateById(It.IsAny <int>()); // Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Result); Assert.IsInstanceOfType(response, typeof(GenericServiceResponse <NotificationTemplateDto>)); mockRepository.Verify(x => x.FindById <NotificationTemplate>(It.IsAny <int>()), Times.Once); }
public void DeleteNotificationTemplateById_Service_Fail() { // Arrange notificationTemplateService = new NotificationTemplateService(mockRepository.Object, mockLogger.Object, mockCache.Object, mockTelemetry.Object); mockRepository.Setup(x => x.Delete <NotificationTemplate>(It.IsAny <int>())).Returns(false).Verifiable(); // Act var response = notificationTemplateService.DeleteNotificationTemplate(It.IsAny <int>()); // Assert Assert.IsNotNull(response); Assert.IsFalse(response.Result); Assert.IsTrue(response.Notifications.HasErrors()); Assert.IsInstanceOfType(response, typeof(GenericServiceResponse <bool>)); mockRepository.Verify(x => x.Delete <NotificationTemplate>(It.IsAny <int>()), Times.Once); }
public void GetAllNotificationTemplates_Service_Fail() { // Arrange notificationTemplateService = new NotificationTemplateService(mockRepository.Object, mockLogger.Object, mockCache.Object, mockTelemetry.Object); mockRepository.Setup(x => x.All <NotificationTemplate>()).Throws(new Exception()).Verifiable(); // Act var response = notificationTemplateService.GetAllNotificationTemplates(); // Assert Assert.IsNotNull(response); Assert.IsNull(response.Result); Assert.IsTrue(response.Notifications.HasErrors()); Assert.IsInstanceOfType(response, typeof(GenericServiceResponse <IEnumerable <NotificationTemplateDto> >)); mockRepository.Verify(x => x.All <NotificationTemplate>(), Times.Once); }
public NotificationTemplatesController(INotificationTemplateService service) { _service = service; }
public NotificationManager(INotificationTemplateResolver resolver, Func <IPlatformRepository> repositoryFactory, INotificationTemplateService notificationTemplateService) { _resolver = resolver; _repositoryFactory = repositoryFactory; _notificationTemplateService = notificationTemplateService; }
public NotificationTemplatesController(INotificationTemplateService notificationTemplateService, IWidgetService widgetService) { _notificationTemplateService = notificationTemplateService; _widgetService = widgetService; }
public PlatformExportImportManager(ISecurityService securityService, IRoleManagementService roleManagementService, ISettingsManager settingsManager, IDynamicPropertyService dynamicPropertyService, IModuleCatalog moduleCatalog, ICacheManager<object> cacheManager, INotificationTemplateService notificationTemplateService) { _dynamicPropertyService = dynamicPropertyService; _securityService = securityService; _roleManagementService = roleManagementService; _settingsManager = settingsManager; _moduleCatalog = moduleCatalog; _cacheManager = cacheManager; _notificationTemplateService = notificationTemplateService; _manifestPartUri = PackUriHelper.CreatePartUri(new Uri("Manifest.json", UriKind.Relative)); _platformEntriesPartUri = PackUriHelper.CreatePartUri(new Uri("PlatformEntries.json", UriKind.Relative)); }
public NotificationTemplateSetupModel() { _notificationTemplateService = HostContainer.GetInstance <INotificationTemplateService>(); Step = NotificationEnums.NotificationSetupStep.SetupNotificationTemplate; }
public NotificationSetupController(INotificationService notificationService, IContactService contactService, INotificationTemplateService notificationTemplateService) { _notificationService = notificationService; _contactService = contactService; _notificationTemplateService = notificationTemplateService; }
public HomeController(ILogger <HomeController> logger, INotificationTemplateService notificationTemplateService) { _logger = logger; this.notificationTemplateService = notificationTemplateService; }
public EmailNotificationService(IEmailClientProvider emailClientProvider, INotificationTemplateService notificationTemplateService) { _emailClientProvider = emailClientProvider ?? throw new ArgumentNullException(nameof(emailClientProvider)); _notificationTemplateService = notificationTemplateService ?? throw new ArgumentNullException(nameof(notificationTemplateService)); }