예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void MasterTemplate()
        {
            string html = _browser.PageGet("~/index");

            Assert.IsTrue(html.Contains("<!-- HEADMARKER -->"));
        }
예제 #4
0
        public void TestDefaultLanguage()
        {
            _browser.PageGet("/index");

            Assert.AreEqual(WebAppConfig.DefaultLanguage, WebAppContext.Session.LanguageCode);
        }