public void maps_provider_profile_dto() { using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == _providerId); var mapper = new ProviderMapper(provider); var providerProfile = mapper.ToProfileDto(); Assert.IsNotNull(providerProfile); AssertCustomPropertiesMapped(providerProfile); } }
public void maps_search_result() { using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == _providerId); var mapper = new ProviderMapper(provider); var searchResult = mapper.ToSearchResult(_truncateLength); Assert.IsNotNull(searchResult); AssertCustomPropertiesMapped(searchResult); AssertPhilosophyOfCareTruncated(searchResult); } }