Ejemplo n.º 1
0
 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"
         );
 }
Ejemplo n.º 2
0
 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"
         );
 }