private int ExploreTests(TestPackage package, TestFilter filter) { ITestEngineResult engineResult = engine.Explore(package, filter); int returnCode = ConsoleRunner.OK; if (engineResult.HasErrors) { DisplayErrorMessages(engineResult); returnCode = ConsoleRunner.UNEXPECTED_ERROR; } else if (options.ExploreOutputSpecifications.Count == 0) { new TestCaseOutputWriter().WriteResultFile(engineResult.Xml, Console.Out); } else { var outputManager = new OutputManager(engineResult.Xml, this.workDirectory); foreach (OutputSpecification spec in options.ExploreOutputSpecifications) { outputManager.WriteTestFile(spec); } } return(returnCode); }
private int ExploreTests(TestPackage package, TestFilter filter) { XmlNode result = engine.Explore(package, filter); if (options.ExploreOutputSpecifications.Count == 0) { new TestCaseOutputWriter().WriteResultFile(result, Console.Out); } else { var outputManager = new OutputManager(result, this.workDirectory); foreach (OutputSpecification spec in options.ExploreOutputSpecifications) { outputManager.WriteTestFile(spec); } } return(ConsoleRunner.OK); }
private int ExploreTests(TestPackage package, TestFilter filter) { XmlNode result = null; using (var runner = _engine.GetRunner(package)) result = runner.Explore(filter); if (_options.ExploreOutputSpecifications.Count == 0) { new TestCaseOutputWriter().WriteResultFile(result, Console.Out); } else { var outputManager = new OutputManager(result, _workDirectory); foreach (OutputSpecification spec in _options.ExploreOutputSpecifications) { outputManager.WriteTestFile(spec); } } return(ConsoleRunner.OK); }
private int ExploreTests(TestPackage package, TestFilter filter) { XmlNode result = null; using (var runner = _engine.GetRunner(package)) result = runner.Explore(filter); if (_options.ExploreOutputSpecifications.Count == 0) { new TestCaseOutputWriter().WriteResultFile(result, Console.Out); } else { var outputManager = new OutputManager(result, _workDirectory); foreach (OutputSpecification spec in _options.ExploreOutputSpecifications) outputManager.WriteTestFile(spec); } return ConsoleRunner.OK; }