コード例 #1
0
 public void Test_CourseWithValidStudentShouldNotThrow()
 {
     var st = new Student(VALID_NAME, VALID_NUMBER);
     var course = new Course();
     try
     {
         course.Join(st);
         course.Leave(st);
     }
     catch (Exception ex)
     {
         Assert.Fail("Expected no exception, but got: " + ex.Message);
     }
 }
コード例 #2
0
 public void Test_LeaveNotExistingStudentShouldThrow()
 {
     var st = new Student(VALID_NAME, VALID_NUMBER);
     var course = new Course();
     course.Leave(st);
 }