public void TestingCourseAddingInvalidNumberOfStudents() { string name = "Tech class"; string studentName = "John"; int id = 10000; var student = new Student(studentName, id); var course = new Course(name); for (var i = 0; i < 32; i += 1) { course.AddStudent(student); } }
public void TestingCourseAddingStudents() { string name = "Tech class"; string studentName = "John"; int id = 10000; var student = new Student(studentName, id); var course = new Course(name); course.AddStudent(student); Assert.AreEqual( student, course.Students[0], string.Format("The object {0} does not equal the expected object {1}", course.Students[0], student)); }
public void TestingCourseRemovingStudents() { string name = "Tech class"; string studentName = "John"; int id = 10000; var student = new Student(studentName, id); var course = new Course(name); course.AddStudent(student); course.RemoveStudent(student); Assert.AreEqual( 0, course.Students.Count, string.Format("The length {0} does not equal the expected length {1}", course.Students.Count, 0)); }