public When_SendEmployerFeedbackEmails_Function_Timer_Trigger_Fires() { var timerSchedule = Substitute.For <TimerSchedule>(); _employerFeedbackService = Substitute.For <IEmployerFeedbackService>(); _functionLogRepository = Substitute.For <IRepository <FunctionLog> >(); var employerFeedbackFunctions = new Functions.EmployerFeedback(_employerFeedbackService, _functionLogRepository); employerFeedbackFunctions.SendEmployerFeedbackEmails( new TimerInfo(timerSchedule, new ScheduleStatus()), new ExecutionContext(), new NullLogger <Functions.EmployerFeedback>() ).GetAwaiter().GetResult(); }
public When_SendEmployerFeedbackEmails_Function_Http_Trigger_Is_Called() { _employerFeedbackService = Substitute.For <IEmployerFeedbackService>(); _functionLogRepository = Substitute.For <IRepository <FunctionLog> >(); var httpContext = new DefaultHttpContext(); var request = httpContext.Request; request.Method = HttpMethod.Get.ToString(); var employerFeedbackFunctions = new Functions.EmployerFeedback(_employerFeedbackService, _functionLogRepository); employerFeedbackFunctions.ManualSendEmployerFeedbackEmails( request, new ExecutionContext(), new NullLogger <Functions.EmployerFeedback>() ).GetAwaiter().GetResult(); }