public async void GivenAJobApplicationService_WhenGetAll_ThenRepoExecutesGetAll() { //Given var mockRepo = Substitute.For <JobApplicationRepository>(); var mockRepoFile = Substitute.For <FileRepository>(); List <JobApplication> expectedJobApplications = new List <JobApplication>() { new JobApplication(Guid.NewGuid(), Guid.NewGuid()) }; mockRepo.GetAll() .Returns(Task.FromResult(expectedJobApplications)); var mockLogger = Substitute.For <ILoggerManager>(); var _jobApplcaitionService = new JobApplicationService(mockRepo, mockRepoFile, mockLogger); //When var actualJobApplications = await _jobApplcaitionService.GetAll(); //Then Assert.Equal(expectedJobApplications, actualJobApplications); }