private IList <FeaturedEmployerModel> GetFeaturedEmployers() { return((from e in _featuredQuery.GetFeaturedEmployers() orderby e.LogoOrder select new FeaturedEmployerModel { Name = e.Name, SearchUrl = SearchRoutes.Search.GenerateUrl(new { advertiser = e.Name, sortOrder = 2 }), LogoUrl = new ContentUrl(StaticEnvironment.GetFileVersion(Assembly.GetExecutingAssembly()), e.LogoUrl) }).ToList()); }
public void TestBundleVersion() { // Bundle versions change across releases, which sometimes means that old versions are asked for. // These need to be redirected to the current version. var otherVersionUrl = new ReadOnlyApplicationUrl("~/bundle/12.7.3.3/css/site1.aspx?v=J_B3Ka2u_VXMW5uzq-yJCcXh4nB_AJAzw-ObqkEnyWE1"); var version = StaticEnvironment.GetFileVersion(Assembly.GetExecutingAssembly()); var currentVersionUrl = new ReadOnlyApplicationUrl("~/bundle/" + version + "/css/site1.aspx?v=J_B3Ka2u_VXMW5uzq-yJCcXh4nB_AJAzw-ObqkEnyWE1"); AssertNoRedirect(currentVersionUrl); AssertRedirect(otherVersionUrl, currentVersionUrl, currentVersionUrl); }