public void WillReduceToOneCssAndScripOnNet35FullTrust() { if (Directory.Exists(rrFolder)) { Directory.Delete(rrFolder, true); } IntegrationFactHelper.SetSampleWeb35StoreAndTrust(Configuration.Store.SqlServerStore, 3000, "Full"); new WebClient().DownloadString("http://localhost:8878/sqlcehosting.aspx"); new WebClient().DownloadString("http://localhost:8878/Local.html"); WaitToCreateResources(expectedJsFiles: 1); var response = new WebClient().DownloadString("http://localhost:8878/Local.html"); Assert.Equal(1, new CssResource().ResourceRegex.Matches(response).Count); Assert.Equal(1, new JavaScriptResource().ResourceRegex.Matches(response).Count); IntegrationFactHelper.SetSampleWeb35StoreAndTrust(Configuration.Store.LocalDiskStore, Timeout.Infinite, "Medium"); }
public void WillReduceToOneCssSpriteAndScriptInHeadOnNet35MediumTrust() { var rrFolderOld = rrFolder; rrFolder = rrFolder.Replace("SampleWeb", "SampleWeb35"); if (Directory.Exists(rrFolder)) { Directory.Delete(rrFolder, true); } IntegrationFactHelper.SetSampleWeb35StoreAndTrust(Configuration.Store.LocalDiskStore, Timeout.Infinite, "Medium"); new WebClient().DownloadString("http://localhost:8878/Local.html"); WaitToCreateResources(1, 1, false, 30000); var response = new WebClient().DownloadString("http://localhost:8878/Local.html"); Assert.Contains("RequestReduce", new CssResource().ResourceRegex.Match(response).ToString()); Assert.Contains("RequestReduce", new JavaScriptResource().ResourceRegex.Match(response).ToString()); Assert.Equal(1, Directory.GetFiles(rrFolder, "*.png").Count()); rrFolder = rrFolderOld; }