Пример #1
0
 public ProviderFeedback(
     IProviderFeedbackService providerFeedbackService,
     IRepository <FunctionLog> functionLogRepository)
 {
     _providerFeedbackService = providerFeedbackService;
     _functionLogRepository   = functionLogRepository;
 }
Пример #2
0
        public When_SendProviderFeedbackEmails_Function_Timer_Trigger_Fires()
        {
            var timerSchedule = Substitute.For <TimerSchedule>();

            _providerFeedbackService = Substitute.For <IProviderFeedbackService>();
            _functionLogRepository   = Substitute.For <IRepository <FunctionLog> >();

            var providerFeedbackFunctions = new Functions.ProviderFeedback(_providerFeedbackService, _functionLogRepository);

            providerFeedbackFunctions.SendProviderFeedbackEmails(
                new TimerInfo(timerSchedule, new ScheduleStatus()),
                new ExecutionContext(),
                new NullLogger <Functions.ProviderFeedback>()
                ).GetAwaiter().GetResult();
        }
Пример #3
0
        public When_SendProviderFeedbackEmails_Function_Http_Trigger_Is_Called()
        {
            _providerFeedbackService = Substitute.For <IProviderFeedbackService>();
            _functionLogRepository   = Substitute.For <IRepository <FunctionLog> >();

            var httpContext = new DefaultHttpContext();
            var request     = httpContext.Request;

            request.Method = HttpMethod.Get.ToString();

            var providerFeedbackFunctions = new Functions.ProviderFeedback(_providerFeedbackService, _functionLogRepository);

            providerFeedbackFunctions.ManualSendProviderFeedbackEmails(
                request,
                new ExecutionContext(),
                new NullLogger <Functions.ProviderFeedback>()
                ).GetAwaiter().GetResult();
        }