public void GetStudentsForCourse_Returns_correctnumber()
        {
            //  Arrange
            //  -------
            TestDb testContext = new TestDb();

            //  instantiate the repository class
            UserRepository repository = new UserRepository(testContext);
            string username = "******";

            //  Action
            //  ------
            IQueryable<User> course1students = repository.GetUsersForCourse(1, username);
            var course2students = repository.GetUsersForCourse(2, username);
            var course3students = repository.GetUsersForCourse(3, username);
            var course4students = repository.GetUsersForCourse(4, username);
            var course5students = repository.GetUsersForCourse(5, username);

            //  Assert
            //  ------
            Assert.AreEqual(5 - 1, course1students.Count());  // 1 less as the method exclued the named user (logged on)
            Assert.AreEqual(5 - 1, course2students.Count());
            Assert.AreEqual(14 - 1, course3students.Count());
            Assert.AreEqual(8 - 1, course4students.Count());
            Assert.AreEqual(14 - 1, course5students.Count());
        }
        public void GetStudentsForCourse1_Returns_Student_Names()
        {
            //  Arrange
            //  -------
            TestDb testContext = new TestDb();

            //  instantiate the repository class
            UserRepository repository = new UserRepository(testContext);
            string username = "******";

            //  Action
            //  ------
            List<User> course1students = repository.GetUsersForCourse(1, username).ToList<User>();

            //  Assert
            //  ------
            Assert.AreEqual("Robert", course1students[0].UserName);
            Assert.AreEqual("Andrew", course1students[1].UserName);
            Assert.AreEqual("Narelle", course1students[2].UserName);
            Assert.AreEqual("Bartoz", course1students[3].UserName);
            Assert.AreEqual(4, course1students.Count());    // Tim is not there, excluded from method as logged on user.
        }