public void GetCoursesUserIdTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var users = mcs.GetCourseUsers(1);
     var courses = mcs.GetCourses(users.ToArray()[0].Id);
     Assert.AreEqual(courses.Count(), 2);
 }
 public void GetCourseIDTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     Course course = mcs.GetCourse(1);
     Assert.AreEqual(course.Id, 1);
     Assert.AreEqual(course.Name, "Some course");
 }
 public void Initialize()
 {
     _Tests = CourseManagementTest.GetInstance();
     _Tests.SetupTables();
     _Storage = new MixedCourseStorage(_Tests.LmsService);
 }
        public void GetCoursesUserOwnerTest()
        {
            MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
            var courses = mcs.GetCourses(new User
            {
                Deleted = false,
                Name = "lex",
                Username = "******"
            }
                                         );

            Assert.AreEqual(courses.Count(), 2);
        }
 public void GetCoursesOwnerNotExistTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var courses = mcs.GetCourses("unknown");
     Assert.AreEqual(courses.Count(), 0);
 }
 public void GetCoursesOwnerTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var courses = mcs.GetCourses("lex");
     Assert.AreEqual(courses.Count(), 2);
 }
 public void GetCoursesUserIdNotExistTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var courses = mcs.GetCourses(Guid.NewGuid());
     Assert.AreEqual(courses.Count(), 0);
 }
 public void GetCourseIDNotFoundTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     Course course = mcs.GetCourse(333);
 }
 public void GetCourseUsersNotFoundTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var courses = mcs.GetCourseUsers(-1);
     Assert.AreEqual(courses.Count(), 0);
 }
 public void GetCourseUsersTest()
 {
     MixedCourseStorage mcs = new MixedCourseStorage(_Tests.LmsService);
     var courses = mcs.GetCourseUsers(1);
     Assert.AreEqual(courses.ToArray()[0].Username, "lex");
 }