public void Get_Found_ReturnIt()
        {
            // Arrange
            var teacher = TeachersRepository.FoundEntity();

            // Act
            var result = _service.Get(teacher.Id);

            // Assert
            Assert.That(result, Is.Not.Null);
        }
        protected void _TeacherFound_TeacherNameUpdated(Func <Guid, string> act)
        {
            // Arrange
            var teacher = TeachersRepository.FoundEntity();

            // Act
            var newName = act(teacher.Id);

            // Assert
            Assert.That(teacher.FullName, Is.EqualTo(newName));
        }
        public void Add_Valid_Saved()
        {
            // Arrange
            var teacher = TeachersRepository.FoundEntity();

            CourseDetails.Teacher.Id = teacher.Id;

            // Act
            Service.Create(CourseDetails);

            // Assert
            UnitOfWork.Received().SaveChanges();
        }
        public void Add_Valid_CourseAdded()
        {
            // Arrange
            var teacher = TeachersRepository.FoundEntity();

            CourseDetails.Teacher.Id = teacher.Id;

            // Act
            Service.Create(CourseDetails);

            // Assert
            CoursesRepository.Received().Add(Arg.Any <Course>());
        }
        public void Add_Valid_Success()
        {
            // Arrange
            var teacher = TeachersRepository.FoundEntity();

            CourseDetails.Teacher.Id = teacher.Id;

            // Act
            var result = Service.Create(CourseDetails);

            // Assert
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Succeed, Is.True);
        }
 private Teacher _SetupFoundTeacher()
 {
     return(TeachersRepository.FoundEntity());
 }