コード例 #1
0
        public void Test_GetCompleted_ReturnIfCourseIsCompleted()
        {
            //Arrange
            Course testCourse1 = new Course("English", "ENGL120");

            testCourse1.Save();
            Course testCourse2 = new Course("Math", "MATH101");

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

            testStudent.Save();

            //Act
            testStudent.Add(testCourse1.GetId());
            testStudent.Add(testCourse2.GetId());
            int result   = testStudent.GetCompleted(testCourse1.GetId());
            int expected = 0;

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