コード例 #1
0
 public void TestGetListOfCoursesPropertyShouldReturnDeepCopyOfTheList()
 {
     var testSchool = new School.School("Test School");
     testSchool.GenerateCourse("Test Course Name");
     Assert.AreNotSame(testSchool.ListOfCourses[0], testSchool.ListOfCourses[0],
         "Courses list property returns same course as first member, but should be copy.");
 }
コード例 #2
0
        public void TestGetListOfCoursesPropertyShouldReturnDeepCopyOfTheList()
        {
            var testSchool = new School.School("Test School");

            testSchool.GenerateCourse("Test Course Name");
            Assert.AreNotSame(testSchool.ListOfCourses[0], testSchool.ListOfCourses[0],
                              "Courses list property returns same course as first member, but should be copy.");
        }