public void Assert_Valid_Mappings() { //new app context var appCtx = ApplicationContext.EnsureContext( ServiceMocks.GetDatabaseContext(), ServiceMocks.GetServiceContext(), CacheHelper.CreateDisabledCacheHelper(), new ProfilingLogger(Mock.Of <ILogger>(), Mock.Of <IProfiler>()), true); Mapper.Initialize(configuration => { var mappers = new MapperConfiguration[] { new ContentModelMapper(), new MediaModelMapper(), new MemberModelMapper(), new PublishedContentMapper(), new RelationModelMapper() }; foreach (var mapper in mappers) { mapper.ConfigureMappings(configuration, appCtx); } }); //TODO: get this testing our mappings Mapper.AssertConfigurationIsValid(); }