Esempio n. 1
0
        public void MakeStudentReport_ThrowsValidationException()
        {
            StudentServiceMock.Setup(service => service.Find(It.IsAny <Func <Student, bool> >()))
            .Returns(FindStudentsValidationExceptionTest());

            Assert.Throws <ValidationException>(() => ReportService.MakeStudentReport("Kirill", "Kononov"));
        }
Esempio n. 2
0
        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>()));
        }
Esempio n. 3
0
        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>()));
        }