Beispiel #1
0
        public void LoadTests(IList <string> files)
        {
            if (IsPackageLoaded)
            {
                UnloadTests();
            }

            TestFiles.Clear();
            TestFiles.AddRange(files);
            _events.FireTestsLoading(files);

            TestPackage = MakeTestPackage(files);

            Runner = TestEngine.GetRunner(TestPackage);

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

            Results.Clear();

            _events.FireTestLoaded(Tests);

            foreach (var subPackage in TestPackage.SubPackages)
            {
                Services.RecentFiles.SetMostRecent(subPackage.FullName);
            }
        }
Beispiel #2
0
        public void LoadTests(IList <string> files)
        {
            if (IsPackageLoaded)
            {
                UnloadTests();
            }

            _events.FireTestsLoading(files);

            TestFiles.Clear();
            TestFiles.AddRange(files);

            TestPackage         = MakeTestPackage(files);
            _lastRunWasDebugRun = false;

            Runner = TestEngine.GetRunner(TestPackage);
            Tests  = new TestNode(Runner.Explore(TestFilter.Empty));

            MapTestsToPackages();
            AvailableCategories = GetAvailableCategories();

            Results.Clear();

            _assemblyWatcher.Setup(1000, files as IList);
            _assemblyWatcher.AssemblyChanged += (path) => _events.FireTestChanged();
            _assemblyWatcher.Start();

            _events.FireTestLoaded(Tests);

            foreach (var subPackage in TestPackage.SubPackages)
            {
                Services.RecentFiles.Latest = subPackage.FullName;
            }
        }
Beispiel #3
0
        public void LoadTests(IList <string> files)
        {
            if (IsPackageLoaded)
            {
                UnloadTests();
            }

            TestFiles.Clear();
            TestFiles.AddRange(files);
            _events.FireTestsLoading(files);

            TestPackage         = MakeTestPackage(files);
            _lastRunWasDebugRun = false;

            Runner = TestEngine.GetRunner(TestPackage);
            Tests  = ExploreTestPackage(TestPackage);
            AvailableCategories = GetAvailableCategories();

            Results.Clear();

            _assemblyWatcher.Setup(1000, files as IList);
            _assemblyWatcher.AssemblyChanged += new AssemblyChangedHandler(OnChange);
            _assemblyWatcher.Start();
            _events.FireTestLoaded(Tests);

            foreach (var subPackage in TestPackage.SubPackages)
            {
                Services.RecentFiles.SetMostRecent(subPackage.FullName);
            }
        }
Beispiel #4
0
 // Unload tests without sending events
 private void UnloadAllTests()
 {
     Runner.Unload();
     Runner.Dispose();
     Tests = null;
     AvailableCategories = null;
     TestPackage         = null;
     TestFiles.Clear();
     Results.Clear();
     _assemblyWatcher.Stop();
 }
Beispiel #5
0
        public void UnloadTests()
        {
            _events.FireTestsUnloading();

            Runner.Unload();
            Tests = null;
            AvailableCategories = null;
            TestPackage         = null;
            TestFiles.Clear();
            Results.Clear();

            _events.FireTestUnloaded();
        }
Beispiel #6
0
        public void UnloadTests()
        {
            _events.FireTestsUnloading();

            UnloadTestsIgnoringErrors();
            Runner.Dispose();
            Tests = null;
            AvailableCategories = null;
            TestPackage         = null;
            TestFiles.Clear();
            Results.Clear();
            _assemblyWatcher.Stop();

            _events.FireTestUnloaded();
        }
Beispiel #7
0
        // Load Tests without sending events
        private void LoadAllTests(IList <string> files)
        {
            TestFiles.Clear();
            TestFiles.AddRange(files);

            TestPackage         = MakeTestPackage(files);
            _lastRunWasDebugRun = false;

            Runner = TestEngine.GetRunner(TestPackage);
            Tests  = new TestNode(Runner.Explore(TestFilter.Empty));
            AvailableCategories = GetAvailableCategories();

            Results.Clear();

            _assemblyWatcher.Setup(1000, files as IList);
            _assemblyWatcher.AssemblyChanged += (path) => _events.FireTestChanged();
            _assemblyWatcher.Start();
        }