コード例 #1
0
        public void TestChangeStudent()
        {
            TestStudentController = new StudentController("E:/NAU/TEST/data.dat");
            for (var i = 0; i < 50; i++)
            {
                TestStudentController.AddStudent(new Student(i));
            }

            TestStudentController.ChangeStudent(
                TestStudentController.GetStudent(43),
                new Student(90));

            TestStudentController.ChangeStudent(
                TestStudentController.GetStudent(42),
                new Student(80));

            Assert.AreEqual(90, TestStudentController.GetStudent(90).Id);
            Assert.AreEqual(80, TestStudentController.GetStudent(80).Id);
        }