public AlertServiceTests() { _nyssContext = Substitute.For <INyssContext>(); _emailPublisherService = Substitute.For <IEmailPublisherService>(); var emailTextGeneratorService = Substitute.For <IEmailTextGeneratorService>(); _smsTextGeneratorService = Substitute.For <ISmsTextGeneratorService>(); var config = Substitute.For <INyssWebConfig>(); var loggerAdapter = Substitute.For <ILoggerAdapter>(); _dateTimeProvider = Substitute.For <IDateTimeProvider>(); _authorizationService = Substitute.For <IAuthorizationService>(); _alertService = new AlertService(_nyssContext, _emailPublisherService, emailTextGeneratorService, config, _smsTextGeneratorService, loggerAdapter, _dateTimeProvider, _authorizationService); _alerts = TestData.GetAlerts(); var alertsDbSet = _alerts.AsQueryable().BuildMockDbSet(); _nyssContext.Alerts.Returns(alertsDbSet); var gatewaySettings = TestData.GetGatewaySettings(); var gatewaySettingsDbSet = gatewaySettings.AsQueryable().BuildMockDbSet(); _nyssContext.GatewaySettings.Returns(gatewaySettingsDbSet); emailTextGeneratorService.GenerateEscalatedAlertEmail(TestData.ContentLanguageCode) .Returns((TestData.EscalationEmailSubject, TestData.EscalationEmailBody)); _dateTimeProvider.UtcNow.Returns(_now); _authorizationService.GetCurrentUser().Returns(_currentUser); }
public IdentityUserServiceTests() { _loggerAdapterMock = Substitute.For <ILoggerAdapter>(); _configMock = new ConfigSingleton(); _emailPublisherServiceMock = Substitute.For <IEmailPublisherService>(); _nyssContextMock = Substitute.For <INyssContext>(); _emailTextGeneratorServiceMock = Substitute.For <IEmailTextGeneratorService>(); }
public IdentityUserRegistrationServiceTests() { _loggerAdapterMock = Substitute.For <ILoggerAdapter>(); _emailPublisherServiceMock = Substitute.For <IEmailPublisherService>(); _configMock = new ConfigSingleton { BaseUrl = "https://testurl" }; _nyssContext = Substitute.For <INyssContext>(); _emailTextGeneratorServiceMock = Substitute.For <IEmailTextGeneratorService>(); }
public FeedbackService(IEmailPublisherService emailPublisherService, INyssWebConfig config, IAuthorizationService authorizationService, IDateTimeProvider dateTimeProvider) { _emailPublisherService = emailPublisherService; _config = config; _authorizationService = authorizationService; _dateTimeProvider = dateTimeProvider; }
public IdentityUserRegistrationService(UserManager <IdentityUser> userManager, ILoggerAdapter loggerAdapter, INyssWebConfig config, IEmailPublisherService emailPublisherService, INyssContext nyssContext, IEmailTextGeneratorService emailTextGeneratorService) { _userManager = userManager; _loggerAdapter = loggerAdapter; _config = config; _emailPublisherService = emailPublisherService; _nyssContext = nyssContext; _emailTextGeneratorService = emailTextGeneratorService; }
public AlertService( INyssContext nyssContext, IEmailPublisherService emailPublisherService, IEmailTextGeneratorService emailTextGeneratorService, INyssWebConfig config, ISmsTextGeneratorService smsTextGeneratorService, ILoggerAdapter loggerAdapter, IDateTimeProvider dateTimeProvider, IAuthorizationService authorizationService) { _nyssContext = nyssContext; _emailPublisherService = emailPublisherService; _emailTextGeneratorService = emailTextGeneratorService; _smsTextGeneratorService = smsTextGeneratorService; _loggerAdapter = loggerAdapter; _dateTimeProvider = dateTimeProvider; _authorizationService = authorizationService; _config = config; }
public VerificationEmailService(INyssWebConfig config, IEmailPublisherService emailPublisherService, IEmailTextGeneratorService emailTextGeneratorService) { _config = config; _emailPublisherService = emailPublisherService; _emailTextGeneratorService = emailTextGeneratorService; }
public EmailToSMSServiceTests() { _emailPublisherServiceMock = Substitute.For <IEmailPublisherService>(); _emailToSMSService = new EmailToSMSService(_emailPublisherServiceMock); }
public EmailToSMSService(IEmailPublisherService emailPublisherService) { _emailPublisherService = emailPublisherService; }