Exemplo n.º 1
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;
            }
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
 private void OnChange(string fullpath)
 {
     _events.FireTestChanged();
 }