public void GetCourse_NullReferenceException_WhenCourseIDisZero()
        {
            //ARRANGE
            int courId     = 0;
            var Assistante = new RSAssistantRole(new Mock <IRSUnitOfWork>().Object);

            //ASSERT
            Assert.ThrowsException <NullReferenceException>(() => Assistante.GetUserById(courId));
        }
        public void GetUser_ReturnsNull_WhenUserDoesNotExist()
        {
            //ARRANGE
            int userId = 10000;

            MockUserRepository.Setup(x => x.GetById(userId)).Returns(UserList().FirstOrDefault(x => x.Id == userId));
            MockUofW.Setup(x => x.UserRepository).Returns(MockUserRepository.Object);

            var ass = new RSAssistantRole(MockUofW.Object);

            //ACT
            var userById = ass.GetUserById(userId);

            //ASSERT
            Assert.IsNull(userById);
        }
        public void GetUser_ReturnsUserByIDFromDB()
        {
            //ARRANGE
            int userId = 1;

            MockUserRepository.Setup(x => x.GetById(userId)).Returns(UserList().FirstOrDefault(x => x.Id == userId));
            MockUofW.Setup(x => x.UserRepository).Returns(MockUserRepository.Object);

            var ass = new RSAssistantRole(MockUofW.Object);

            //ACT
            var userById = ass.GetUserById(userId);

            //ASSERT
            Assert.AreEqual(userId, userById.Id);
        }