public void ShouldMap()
        {
            SetUp();

            var model = new CreateAssessmentModelBuilder().WithGradeLevelTypeId(_4ThGradeLevelDescriptor.GradeLevelTypeId).Build();
            var entity = new CreateModelToAssessmentMapper(_genericRepositoryStub, 
                _createModelToAssessmentPerformanceLevelMapperMock, _createModelToCreateModelToAssessmentSectionMapperMock, _createModelToCreateModelToAssessmentLearningStandardMapperMock).Build(model);

            entity.AssessmentTitle.ShouldBe(model.AssessmentTitle);
            entity.AdministeredDate.ShouldBe(model.AdministeredDate.GetValueOrDefault());
            entity.AssessmentCategoryTypeId.ShouldBe((int) model.QuestionType.GetValueOrDefault());

            entity.AssessedGradeLevelDescriptorId.ShouldBe(_4ThGradeLevelDescriptor.GradeLevelDescriptorId);
            entity.AcademicSubjectDescriptorId.ShouldBe(_course.AcademicSubjectDescriptorId.GetValueOrDefault());
        }
Example #2
0
        public void ShouldMap()
        {
            SetUp();

            var model  = new CreateAssessmentModelBuilder().WithGradeLevelTypeId(_4ThGradeLevelDescriptor.GradeLevelTypeId).Build();
            var entity = new CreateModelToAssessmentMapper(_genericRepositoryStub,
                                                           _createModelToAssessmentPerformanceLevelMapperMock, _createModelToCreateModelToAssessmentSectionMapperMock, _createModelToCreateModelToAssessmentLearningStandardMapperMock).Build(model);

            entity.AssessmentTitle.ShouldBe(model.AssessmentTitle);
            entity.AdministeredDate.ShouldBe(model.AdministeredDate.GetValueOrDefault());
            entity.AssessmentCategoryTypeId.ShouldBe((int)model.QuestionType.GetValueOrDefault());

            entity.AssessedGradeLevelDescriptorId.ShouldBe(_4ThGradeLevelDescriptor.GradeLevelDescriptorId);
            entity.AcademicSubjectDescriptorId.ShouldBe(_course.AcademicSubjectDescriptorId.GetValueOrDefault());
        }