public void TestHtmlUrlNotFound() { var url = new ReadOnlyApplicationUrl("~/badurl"); var pageText = new HtmlPage(TestUrlNotFound(url, AcceptAll)).ToString(); Assert.IsTrue(pageText.Contains("The page you are looking for,")); Assert.IsTrue(pageText.Contains(url.PathAndQuery)); }
public void TestHtmlServerError() { var url = new ReadOnlyApplicationUrl("~/dev.aspx?action=error"); var pageText = new HtmlPage(TestServerError(url, AcceptAll)).ToString(); Assert.IsTrue(pageText.Contains("<h1>Server error</h1>")); Assert.IsTrue(pageText.Contains("An error has occurred in the LinkMe website.")); Assert.IsFalse(pageText.Contains("Requested URL")); }