public void creates_correct_page_title_when_target_facility_matches_primary_location() { using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == _providerId); var title = new ProviderPageTitle(provider, _seoSettingsForMatchingFacility).ToString(); AssertValueIsIncludedOnce(title, provider.PrimaryOrgUnit.OrgUnit.OrgUnitPublished.City); } }
public void creates_correct_page_title_when_target_facility_is_different() { using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == _providerId); var title = new ProviderPageTitle(provider, _seoSettingsForDifferentFacility).ToString(); AssertValueIsIncludedOnce(title, _seoSettingsForDifferentFacility.FacilityName); } }
public void creates_correct_page_title_when_target_market_area_is_different() { using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == _providerId); var title = new ProviderPageTitle(provider, _seoSettingsForDifferentMarketArea).ToString(); Assert.IsNotNullOrEmpty(title); AssertIsCorrectProviderName(provider, title); AssertIsCorrectSpecialties(provider, title); Assert.IsTrue(title.Contains(_seoSettingsForDifferentMarketArea.TargetCity)); Assert.IsTrue(title.Contains(provider.PrimaryOrgUnit.OrgUnit.OrgUnitPublished.City)); } }