コード例 #1
0
        public async Task GetAllInternshipsOfTeacherShould_ReturnTheCorrectValue()
        {
            await sut.AssignReviewer(internship.Id, new List <Guid> {
                userTeacher.Id
            });

            var reviewerInternship = _context.ReviewerInternships.Where(x => x.ReviewerId == userTeacher.Id && x.ReviewedInternshipId == internship.Id).FirstOrDefault();

            reviewerInternship.StateOfTeacher = InternshipState.InReviewByTeacher;
            _context.Update(reviewerInternship);
            await _context.SaveChangesAsync();

            var list = await sut.GetAllInternshipsOfTeacher(userTeacher.Id);

            Assert.True(list.Contains(internship));
        }