Exemplo n.º 1
0
 public void TestCourseAddSameStudentShouldThrow()
 {
     var course = new Course("C#");
     var student = new Student("Pesho", 10111);
     course.JoinCourse(student);
     course.JoinCourse(student);
 }
Exemplo n.º 2
0
 public void TestCourseAddCorrectStudentShouldNotThrow()
 {
     var course = new Course("C#");
     var student = new Student("Pesho", 10111);
     course.JoinCourse(student);
     Assert.AreEqual(student, course.Students[0]);
 }
Exemplo n.º 3
0
        public void TestCourseRemoveExistantStudentShouldNotThrow()
        {
            var course = new Course("C#");
            var student = new Student("Pesho", 10111);
            course.JoinCourse(student);
            course.LeaveCourse(student);

            Assert.IsFalse(course.Students.Contains(student));
        }
Exemplo n.º 4
0
        public void TestCourseAddMoreThanMaxStudentsShouldThrow()
        {
            var course = new Course("C#");

            for (int i = 0; i < 40; i++)
            {
                course.JoinCourse(new Student("Student" + i, 10000 + i));
            }
        }
Exemplo n.º 5
0
 public void TestCourseAddNullStudentShouldThrow()
 {
     var course = new Course("C#");
     Student student = null;
     course.JoinCourse(student);
 }