public void RunTests(TestFilter filter, UnitTestRunner.ITestRunnerCallback testRunnerEventListener)
        {
            try
            {
                if (testRunnerEventListener != null)
                {
                    testRunnerEventListener.RunStarted(testSuite.TestName.FullName, testSuite.TestCount);
                }

                ExecuteTestSuite(testSuite, testRunnerEventListener, filter);

                if (testRunnerEventListener != null)
                {
                    testRunnerEventListener.RunFinished();
                }
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                if (testRunnerEventListener != null)
                {
                    testRunnerEventListener.RunFinishedException(e);
                }
            }
        }
Exemple #2
0
        public UnitTestResult[] RunTests(string[] tests, UnitTestRunner.ITestRunnerCallback testRunnerEventListener)
        {
            List <String> assemblies = GetAssemblies();
            TestSuite     suite      = PrepareTestSuite(assemblies);

            ITestFilter filter = TestFilter.Empty;

            if (tests != null && tests.Any())
            {
                filter = new SimpleNameFilter(tests);
            }

            testRunnerEventListener.RunStarted(suite.TestName.FullName, suite.TestCount);

            NUnit.Core.TestResult result = ExecuteTestSuite(suite,
                                                            testRunnerEventListener,
                                                            filter);
            UpdateTestResults(result);

            testRunnerEventListener.RunFinished();

            return(testList.ToArray());
        }
        public void RunTests(string[] tests, UnitTestRunner.ITestRunnerCallback testRunnerEventListener)
        {
            List <String> assemblies = GetAssemblies();
            TestSuite     suite      = PrepareTestSuite(assemblies);

            ITestFilter filter = TestFilter.Empty;

            if (tests != null && tests.Any())
            {
                filter = new SimpleNameFilter(tests);
            }

            if (testRunnerEventListener != null)
            {
                testRunnerEventListener.RunStarted(suite.TestName.FullName, suite.TestCount);
            }

            ExecuteTestSuite(suite, testRunnerEventListener, filter);

            if (testRunnerEventListener != null)
            {
                testRunnerEventListener.RunFinished();
            }
        }
Exemple #4
0
 public void RunFinished(NUnit.Core.TestResult result)
 {
     testRunnerEventListener.RunFinished();
 }