Exemplo n.º 1
0
        public void SetUp()
        {
            _commitmentServiceMock      = new Mock <ICommitmentService>();
            _accountServiceMock         = new Mock <IAccountService>();
            _notificationsApiClientMock = new Mock <INotificationsApi>();
            _surveyLoggerMock           = new Mock <ILogger <EmployerSurveyEmailer> >();
            _roatpService = new Mock <IRoatpService>();

            _dbConnection = new SqlConnection(_configuration.GetConnectionString("EmployerEmailStoreConnection"));
            _dbEmployerFeedbackRepository = new EmployerFeedbackRepository(_dbConnection);

            _dataRetreivalService = new EmployerFeedbackDataRetrievalService(
                _commitmentServiceMock.Object,
                _accountServiceMock.Object,
                _dbEmployerFeedbackRepository);

            _helper = new UserRefreshService(new Mock <ILogger <UserRefreshService> >().Object, _dbEmployerFeedbackRepository);
            _surveyInviteGenerator = new SurveyInviteGenerator(_options, _dbEmployerFeedbackRepository, Mock.Of <ILogger <SurveyInviteGenerator> >());
            var providerRefreshSevice = new ProviderRefreshService(_dbEmployerFeedbackRepository, _roatpService.Object);

            SetupApiMocks(2);

            _initiateFunction              = new InitiateDataRefreshFunction(_dbEmployerFeedbackRepository);
            _providersRefreshFunction      = new ProviderRefreshFunction(providerRefreshSevice);
            _accountRetrieveFunction       = new EmployerDataRetrieveFeedbackAccountsFunction(_commitmentServiceMock.Object);
            _accountDataRetrieveFunction   = new AccountRefreshFunction(_dataRetreivalService);
            _processActiveFeedbackFunction = new ProcessActiveFeedbackFunction(_helper);
            _surveyInviteGeneratorFunction = new EmployerSurveyInviteGeneratorFunction(_surveyInviteGenerator);
        }
 public UserRefreshService(
     ILogger <UserRefreshService> logger,
     IEmployerFeedbackRepository dbRepository)
 {
     _logger       = logger;
     _dbRepository = dbRepository;
 }
Exemplo n.º 3
0
 public EmployerSurveyInviteEmailer(
     IEmployerFeedbackRepository emailDetailsStore,
     INotificationsApi emailService,
     IOptions <EmailSettings> settings,
     ILogger <EmployerSurveyEmailer> logger) : base(emailService, logger, settings)
 {
     _emailDetailsStore = emailDetailsStore;
 }
 public EnsureFeedbackNotSubmittedRecentlyAttribute(
     IEmployerFeedbackRepository employerEmailDetailRepository
     , ProvideFeedbackEmployerWebConfiguration config
     )
 {
     _employerEmailDetailRepository = employerEmailDetailRepository;
     _config = config;
 }
Exemplo n.º 5
0
 public EmployerFeedbackDataRetrievalService(
     ICommitmentService commitmentService,
     IAccountService accountService,
     IEmployerFeedbackRepository emailDetailsRepository)
 {
     _commitmentService      = commitmentService;
     _accountService         = accountService;
     _emailDetailsRepository = emailDetailsRepository;
 }
Exemplo n.º 6
0
 public EmployerSurveyReminderEmailer(
     IEmployerFeedbackRepository emailDetailsStore,
     INotificationsApi emailService,
     IOptions <EmailSettings> settings,
     ILogger <EmployerSurveyEmailer> logger) : base(emailService, logger, settings)
 {
     _emailDetailsStore = emailDetailsStore;
     _reminderDays      = settings.Value.ReminderDays;
 }
Exemplo n.º 7
0
 public SurveyInviteGenerator(
     IOptions <EmailSettings> options,
     IEmployerFeedbackRepository employerEmailDetailRepository,
     ILogger <SurveyInviteGenerator> logger)
 {
     _emailSettingsConfig           = options.Value;
     _employerEmailDetailRepository = employerEmailDetailRepository;
     _logger = logger;
 }
Exemplo n.º 8
0
 public HomeController(
     IEmployerFeedbackRepository employerEmailDetailsRepository,
     ISessionService sessionService,
     IEncodingService encodingService,
     ILogger <HomeController> logger)
 {
     _employerEmailDetailsRepository = employerEmailDetailsRepository;
     _sessionService  = sessionService;
     _encodingService = encodingService;
     _logger          = logger;
 }
 public TrainingProviderService(
     ICommitmentService commitmentService
     , IEncodingService encodingService
     , IEmployerFeedbackRepository employerFeedbackRepository
     , ProvideFeedbackEmployerWebConfiguration config)
 {
     _commitmentService          = commitmentService;
     _encodingService            = encodingService;
     _employerFeedbackRepository = employerFeedbackRepository;
     _config = config;
 }
 public ProviderController(
     IEmployerFeedbackRepository employerEmailDetailsRepository
     , ISessionService sessionService
     , ITrainingProviderService trainingProviderService
     , IEncodingService encodingService
     , ILogger <ProviderController> logger
     , UrlBuilder urlBuilder
     )
 {
     _employerEmailDetailsRepository = employerEmailDetailsRepository;
     _sessionService          = sessionService;
     _trainingProviderService = trainingProviderService;
     _encodingService         = encodingService;
     _logger     = logger;
     _urlBuilder = urlBuilder;
 }
Exemplo n.º 11
0
 public InitiateDataRefreshFunction(
     IEmployerFeedbackRepository dbRepository)
 {
     _dbRepository = dbRepository;
 }
Exemplo n.º 12
0
 public FeedbackController(IEmployerFeedbackRepository feedback, ILogger <FeedbackController> logger, IMapper mapper)
 {
     this.feedback = feedback;
     this.logger   = logger;
     this.mapper   = mapper;
 }
 public EnsureFeedbackNotSubmitted(IEmployerFeedbackRepository employerEmailDetailRepository, IEncodingService encodingService)
 {
     _employerEmailDetailRepository = employerEmailDetailRepository;
     _encodingService = encodingService;
 }
Exemplo n.º 14
0
 public FeedbackQueryHandler(IEmployerFeedbackRepository employerFeedbackRepository, ILogger <FeedbackQueryHandler> logger)
 {
     _employerfeedbackRepository = employerFeedbackRepository;
     _logger = logger;
 }
Exemplo n.º 15
0
 public ProviderRefreshService(IEmployerFeedbackRepository dbRepository, IRoatpService roatpService)
 {
     _dbRepository = dbRepository;
     _roatpService = roatpService;
 }
Exemplo n.º 16
0
 public ReviewAnswersOrchestrator(IEmployerFeedbackRepository employerEmailDetailRepository, ILogger <ReviewAnswersOrchestrator> logger)
 {
     _employerFeedbackRepository = employerEmailDetailRepository;
     _logger = logger;
 }