예제 #1
0
        public void TestStudentIsNotGraduated()
        {
            IStudent student = Repository.GetStudent(4);
            IDiploma diploma = Repository.GetDiploma(1);
            StudentGraduationTracker tracker = new StudentGraduationTracker(student, diploma);

            ResultGraduationTracker result = tracker.StudentHasGraduated();



            Assert.IsFalse(result.IsGraduated);
            Assert.IsTrue(result.Standing == Standing.Remedial);
        }
예제 #2
0
        public void TestStudentIsGraduated()
        {
            IStudent student = Repository.GetStudent(2);
            IDiploma diploma = Repository.GetDiploma(1);
            StudentGraduationTracker tracker = new StudentGraduationTracker(student, diploma);

            ResultGraduationTracker result = tracker.StudentHasGraduated();

            Assert.IsTrue(result.IsGraduated);
            Assert.IsTrue(result.Standing == Standing.MagnaCumLaude);
            // not too sure about this bussiness rule
            Assert.IsTrue(result.Credits > 1);
        }