コード例 #1
0
ファイル: StudentTest.cs プロジェクト: CharlesEwel/registrar
        public void Test_DropCourse_DropsSelectedCourse()
        {
            Student testStudent = new Student("Bob", enrollmentDate);
              testStudent.Save();
              Course testCourse1 = new Course("CS101", 1);
              testCourse1.Save();
              testStudent.AddCourse(testCourse1.GetId());
              Course testCourse2 = new Course("PHIL101", 2);
              testCourse2.Save();
              testStudent.AddCourse(testCourse2.GetId());

              testStudent.DropCourse(testCourse1.GetId());

              List<Course> resultList = testStudent.GetCourses();
              List<Course> expectedList= new List<Course>{testCourse2};

              Assert.Equal(expectedList, resultList);
        }