예제 #1
0
        /// <summary>
        /// Executes the provided test batch
        /// </summary>
        /// <param name="run">The test batch which will be executed.</param>
        /// <param name="runContext">The RunContext for this TestCase. Determines whether the test should be debugged or not.</param>
        /// <param name="frameworkHandle">The FrameworkHandle for this test execution instance.</param>
        /// <returns></returns>
        private static bool ExecuteTests(TestRun run, IRunContext runContext, IFrameworkHandle frameworkHandle)
        {
            if (run.Runner != null)
            {
                using (var context = CreateExecutionContext(runContext, frameworkHandle))
                {
                    run.Execute(context);
                }
            }
            else
            {
                Logger.Error("No suitable executor found for [{0}].", string.Join(", ", run.Tests));
            }

            return(run.Runner != null);
        }