public void MakeStudentReport_ThrowsValidationException() { StudentServiceMock.Setup(service => service.Find(It.IsAny <Func <Student, bool> >())) .Returns(FindStudentsValidationExceptionTest()); Assert.Throws <ValidationException>(() => ReportService.MakeStudentReport("Kirill", "Kononov")); }
public void MakeLectureReport_ValidCall() { ReportService.MakeLectureReport("Math"); LectureServiceMock.Verify(s => s.Find(It.IsAny <Func <Lecture, bool> >())); StudentServiceMock.Verify(l => l.GetAsync(It.IsAny <int>())); ProfessorServiceMock.Verify(p => p.GetAsync(It.IsAny <int>())); }
public void MakeStudentReport_ValidCall() { ReportService.MakeStudentReport("Kirill", "Kononov"); StudentServiceMock.Verify(s => s.Find(It.IsAny <Func <Student, bool> >())); LectureServiceMock.Verify(l => l.GetAsync(It.IsAny <int>())); ProfessorServiceMock.Verify(p => p.GetAsync(It.IsAny <int>())); }