示例#1
0
        public void Test_GetMajorCourse_ReturnIfStudentsIsMajorRelated()
        {
            //Arrange
            Department testDepartment = new Department("English");

            testDepartment.Save();
            Course testCourse = new Course("English", "ENGL120", testDepartment.GetId());

            testCourse.Save();
            Student testStudent = new Student("Britton", "2010-09-01", testDepartment.GetId());

            testStudent.Save();

            //Act
            testCourse.Add(testStudent.GetId());
            int result   = testStudent.GetMajorCourse(testCourse.GetId());
            int expected = 1;

            //Assert
            Assert.Equal(expected, result);
        }