Пример #1
0
        internal void ExploreAssembly()
        {
            ITestRunner testRunner = CreateTestRunner();

            try {
                XmlNode exploreResult = testRunner.Explore(TestFilter.Empty);
                ExploreRun = new NUnitTestRun(exploreResult);

                testRunner.Unload();
            }
            catch (Exception e) {
                MessageBox.Show(e.ToString(), "Load Assembly", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Пример #2
0
        /// <summary>
        /// Run Tests with NUnit
        /// https://github.com/nunit/docs/wiki/Test-Filters
        /// </summary>
        internal void Run(string test)
        {
            TestFilter filter = !string.IsNullOrEmpty(test)
                ? new TestFilter($"<filter><test>{test}</test></filter>")
                : TestFilter.Empty;

            try {
                ITestRunner testRunner = CreateTestRunner();
                XmlNode     runResult  = testRunner.Run(this, filter);
                ExploreRun = new NUnitTestRun(runResult);

                testRunner.Unload();
            }
            catch (Exception e) {
                Log.Debug(e);
                MessageBox.Show($"{e}", "Exception in NUnit");
            }
        }