public void Throw_ArgumentNullException_When_CoursesTO_IsNULL()
        {
            MockCourseRepository.Setup(x => x.GetAll()).Returns(EmptyCourseList);
            MockUofW.Setup(x => x.CourseRepository).Returns(MockCourseRepository.Object);

            var Assistante = new RSAssistantRole(MockUofW.Object);

            //ASSERT
            Assert.ThrowsException <ArgumentNullException>(() => Assistante.GetCourses());
        }
        public void GetCourses_UserRepositoryIsCalledOnce()
        {
            //ARRANGE
            MockCourseRepository.Setup(x => x.GetAll()).Returns(CourseList);
            MockUofW.Setup(x => x.CourseRepository).Returns(MockCourseRepository.Object);

            var ass = new RSAssistantRole(MockUofW.Object);

            //ACT
            var coursAll = ass.GetCourses();

            //ASSERT
            MockCourseRepository.Verify(x => x.GetAll(), Times.Once);
        }
        public void GetCourses_ReturnsAllCoursesFromDB()
        {
            //ARRANGE
            MockCourseRepository.Setup(x => x.GetAll()).Returns(CourseList);
            MockUofW.Setup(x => x.CourseRepository).Returns(MockCourseRepository.Object);

            var ass = new RSAssistantRole(MockUofW.Object);

            //ACT
            var cours = ass.GetCourses();

            //ASSERT
            Assert.AreEqual(CourseList().Count, cours.Count);
            Assert.AreEqual(3, cours.Count);
        }