public void RunnerSelectionTest(TestPackage package, RunnerResult expected)
        {
            var runner = _factory.MakeTestRunner(package);
            var result = GetRunnerResult(runner);

            Assert.That(result, Is.EqualTo(expected).Using(RunnerResultComparer.Instance));
        }
        public void RunnerSelectionTest(TestPackage package, RunnerResult expected)
        {
            var masterRunner = new MasterTestRunner(_services, package);
            var runner       = masterRunner.GetEngineRunner();
            var result       = GetRunnerResult(runner);

            Assert.That(result, Is.EqualTo(expected).Using(RunnerResultComparer.Instance));
        }
        private static RunnerResult GetRunnerResult(ITestEngineRunner runner)
        {
            var result = new RunnerResult(runner.GetType());

            if (runner is AggregatingTestRunner aggRunner)
            {
                result.SubRunners = aggRunner.Runners.Select(GetRunnerResult).ToList();
            }

            return(result);
        }