コード例 #1
0
        public void ShouldMap()
        {
            var student = new StudentBuilder()
                .WithFirstName("Hugo")
                .WithLastSurname("Range")
                .WithStudentUsi(12345)
                .Build();
            var parentCourseGrade = new ParentCourseGradeBuilder().WithStudent(student).Build();
            var gradeModel = new ParentCourseGradeToGradeModelMapper().Build(parentCourseGrade);

            gradeModel.StudentFirstName.ShouldBe(student.FirstName);
            gradeModel.StudentLastName.ShouldBe(student.LastSurname);
            gradeModel.StudentUSI.ShouldBe(student.StudentUSI);
            gradeModel.Grade.ShouldBe(parentCourseGrade.GradeEarned);
        }
コード例 #2
0
        public void ShouldMap()
        {
            var student = new StudentBuilder()
                          .WithFirstName("Hugo")
                          .WithLastSurname("Range")
                          .WithStudentUsi(12345)
                          .Build();
            var parentCourseGrade = new ParentCourseGradeBuilder().WithStudent(student).Build();
            var gradeModel        = new ParentCourseGradeToGradeModelMapper().Build(parentCourseGrade);

            gradeModel.StudentFirstName.ShouldBe(student.FirstName);
            gradeModel.StudentLastName.ShouldBe(student.LastSurname);
            gradeModel.StudentUSI.ShouldBe(student.StudentUSI);
            gradeModel.Grade.ShouldBe(parentCourseGrade.GradeEarned);
        }