Exemplo n.º 1
0
        // Reload tests without sending events.
        private void ReloadAllTests()
        {
            string[] files = TestFiles.ToArray();

            // NOTE: The `ITestRunner.Reload` method supported by the engine
            // has some problems, so we use Unload+Load. See issue #328.
            UnloadAllTests();
            LoadAllTests(files);
        }
Exemplo n.º 2
0
        public void ReloadTests()
        {
            _events.FireTestsReloading();

            string[] files = TestFiles.ToArray();

            // NOTE: The `ITestRunner.Reload` method supported by the engine
            // has some problems, so we simulate Unload+Load. See issue #328.

            // Replace Runner in case settings changed
            Runner.Unload();
            Runner.Dispose();
            Runner = TestEngine.GetRunner(TestPackage);

            // Discover tests
            Tests = new TestNode(Runner.Explore(TestFilter.Empty));
            AvailableCategories = GetAvailableCategories();

            Results.Clear();

            _events.FireTestReloaded(Tests);
        }