コード例 #1
0
ファイル: SchoolTest.cs プロジェクト: smghacker/S-M-G
 public void SchoolAddCertainCourseWhoExistsAlreadyTest()
 {
     School school = new School(new List<Student>(), new List<Course>());
     Course course = new Course("C#", new List<Student>());
     Course course1 = new Course("C#", new List<Student>());
     school.AddCourse(course);
     school.AddCourse(course1);
     Assert.AreEqual(1, school.AllCourses.Count);
 }
コード例 #2
0
 public void AddCourseTest()
 {
     Course course = new Course("QualityCode");
     School school = new School();
     school.AddCourse(course);
     Assert.AreEqual(course.Name, school.Courses[0].Name);
 }
コード例 #3
0
ファイル: SchoolTest.cs プロジェクト: smghacker/S-M-G
 public void SchoolAddCourseToSchoolRegularTest()
 {
     School school = new School(new List<Student>(), new List<Course>());
     Course course = new Course("C#", new List<Student>());
     school.AddCourse(course);
     Assert.AreEqual(1, school.AllCourses.Count);
 }
コード例 #4
0
 public void RemoveCourseTest()
 {
     School school = new School();
     Course course = new Course("QualityCode");
     school.AddCourse(course);
     school.RemoveCourse(course);
     Assert.IsTrue(school.Courses.Count == 0);
 }