public static OfflineWebSession SetupBrowser() { OfflineWebSession _browser; string assemblyPath = Assembly.GetExecutingAssembly().CodeBase; if (assemblyPath.StartsWith("file://")) assemblyPath = assemblyPath.Substring(8); string rootPath = Path.GetFullPath(Path.GetDirectoryName(assemblyPath).TrimEnd('\\') + "\\..\\..\\WebServer"); _browser = new OfflineWebSession(rootPath); _browser.PageGet("~/index"); // Initialize the offline web server by requesting a page return _browser; }
public static OfflineWebSession SetupBrowser() { OfflineWebSession _browser; string assemblyPath = Assembly.GetExecutingAssembly().CodeBase; if (assemblyPath.StartsWith("file://")) { assemblyPath = assemblyPath.Substring(8); } string rootPath = Path.GetFullPath(Path.GetDirectoryName(assemblyPath).TrimEnd('\\') + "\\..\\..\\WebServer"); _browser = new OfflineWebSession(rootPath); _browser.PageGet("~/index"); // Initialize the offline web server by requesting a page return(_browser); }
public void MasterTemplate() { string html = _browser.PageGet("~/index"); Assert.IsTrue(html.Contains("<!-- HEADMARKER -->")); }
public void TestDefaultLanguage() { _browser.PageGet("/index"); Assert.AreEqual(WebAppConfig.DefaultLanguage, WebAppContext.Session.LanguageCode); }