private bool RunTests(Tests tests, IEnumerable<TestProject> projects, IEnumerable<TargetRelativePath> buildOutputs) { var testProjects = projects as List<TestProject> ?? projects.ToList(); var buildOutputPaths = buildOutputs as List<TargetRelativePath> ?? buildOutputs.ToList(); return testRunners .Where(testRunner => IsRunnerEnabled(tests, testRunner)) .Select(testRunner => testRunner.Run(testProjects, buildOutputPaths)) .All(result => result); }
private bool IsRunnerEnabled(Tests tests, ITestRunner runner) { bool enabled = tests.IsRunnerEnabled(runner.Name); log.DebugFormat("Test runner {0} is {1}", runner.Name, enabled ? "enabled" : "disabled"); return enabled; }