コード例 #1
0
        public void SetupSession()
        {
            _browser = BrowserFactory.SetupBrowser();

            WebAppConfig.Router.ClearRoutingTable();
            WebAppConfig.LoadControllerClasses();    // re-reads Url attributes
        }
コード例 #2
0
ファイル: BrowserFactory.cs プロジェクト: TheMouster/mvc
        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
ファイル: BrowserFactory.cs プロジェクト: viciproject/mvc
        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);
        }
コード例 #4
0
ファイル: UrlTests.cs プロジェクト: TheMouster/mvc
 public void SetupSession()
 {
     _browser = BrowserFactory.SetupBrowser();
 }
コード例 #5
0
ファイル: RoutingTests.cs プロジェクト: viciproject/mvc
 public void SetupSession()
 {
     _browser = BrowserFactory.SetupBrowser();
 }