示例#1
0
        public void Dispose()
        {
            if (!_isDisposed)
            {
                _isDisposed = true;

                if (_server != null)
                {
                    _server.Dispose();
                }

                if (_dashboard != null)
                {
                    _dashboard.Dispose();
                    _dashboard = null;
                }
            }
        }
示例#2
0
        public WebJobsDashboard CreateDashboard()
        {
            GuardNotDisposed();

            if (_dashboard == null || _dashboard.IsDisposed)
            {
                string browserType = GetFromConfigOrEnvironmentOrDefault("TestBrowser");

                BrowserType browser;
                if (!Enum.TryParse <BrowserType>(browserType, true, out browser))
                {
                    throw new ArgumentException("Unknown browser type: " + browserType);
                }

                _dashboard = new WebJobsDashboard(_server.VirtualPath, browser);
            }

            return(_dashboard);
        }
示例#3
0
 public DashboardTestClass(T fixture)
 {
     Dashboard = fixture.CreateDashboard();
 }