public void TestLeaveCourseMethodShouldWorkProperly() { var testCourse = new Course("testCourseName"); var testStudent = new Student(10001, "Test Student Name"); testStudent.AttendCourse(testCourse); testStudent.LeaveCourse(testCourse); Assert.IsTrue( testCourse.Students.Count == 0, "Students list count is not equal to zero" ); }
public void TestStudentAttendCourseMethodShouldWorkProperly() { var testCourse = new Course("testCourseName"); var testStudent = new Student(10001, "Test Student Name"); testStudent.AttendCourse(testCourse); Assert.AreEqual( testStudent.Name, testCourse.Students[0].Name, "First inserted student's name is not equal to the first name in the list" ); }