public void TestCourseAddSameStudentShouldThrow() { var course = new Course("C#"); var student = new Student("Pesho", 10111); course.JoinCourse(student); course.JoinCourse(student); }
public void TestCourseAddCorrectStudentShouldNotThrow() { var course = new Course("C#"); var student = new Student("Pesho", 10111); course.JoinCourse(student); Assert.AreEqual(student, course.Students[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)); }
public void TestCourseAddMoreThanMaxStudentsShouldThrow() { var course = new Course("C#"); for (int i = 0; i < 40; i++) { course.JoinCourse(new Student("Student" + i, 10000 + i)); } }
public void TestCourseAddNullStudentShouldThrow() { var course = new Course("C#"); Student student = null; course.JoinCourse(student); }