Esempio n. 1
0
            protected override void Act()
            {
                var mapper = MappingFactory.CreateMapper();

                _actualV2Assessment = mapper.Map <V2Assessment>(
                    new V3Assessment {
                    Namespace = "abc://something.org/something/"
                });

                // TODO: AssessmentReference, LearningObjectiveReference, ObjectiveAssessmentReference, StudentAssessmentReference
                // Out of Scope: StudentLearningObjectiveReference

                _actualV2AssessmentReference = mapper.Map <V2AssessmentReference>(
                    new V3AssessmentReference {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2AssessmentItemReference = mapper.Map <V2AssessmentItemReference>(
                    new V3AssessmentItemReference {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2LearningObjective = mapper.Map <V2LearningObjective>(
                    new V3LearningObjective {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2LearningObjectiveReference = mapper.Map <V2LearningObjectiveReference>(
                    new V3LearningObjectiveReference {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2LearningStandard = mapper.Map <V2LearningStandard>(
                    new V3LearningStandard {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2ObjectiveAssessmentReference = mapper.Map <V2ObjectiveAssessmentReference>(
                    new V3ObjectiveAssessmentReference {
                    Namespace = "abc://something.org/something/"
                });

                _actualV2StudentAssessmentReference = mapper.Map <V2StudentAssessmentReference>(
                    new V3StudentAssessmentReference {
                    Namespace = "abc://something.org/something/"
                });
            }
        protected void Application_Start()
        {
            var container = InitializeContainer();

            GlobalConfiguration.Configure(WebApiConfig.Register);
            GlobalConfiguration.Configuration.Services.Replace(typeof(IExceptionHandler), new GlobalExceptionHandler());
            GlobalConfiguration.Configuration.Services.Replace(typeof(IExceptionLogger), new UnhandledExceptionLogger(container.Resolve <ILoggerFactory>()));


            ConfigureFormatters(GlobalConfiguration.Configuration);
            ConfigureTls();

            GlobalConfiguration.Configuration.DependencyResolver = container.Resolve <System.Web.Http.Dependencies.IDependencyResolver>();

            XmlConfigurator.Configure();
            Mapper = MappingFactory.CreateMapper();
        }