Exemplo 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"));
        }
Exemplo 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>()));
        }
Exemplo 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>()));
        }