public RunTests ( Action |
||
callback | Action |
The callback that receives the test results |
filter | string | A string containing the XML representation of the filter to use |
Результат | string |
public static void TestResultSchemaMatches() { Assert.Multiple(() => { var controller = new FrameworkController("mock-assembly", Test.IdPrefix, new Dictionary <string, string>()); controller.LoadTests(); var frameworkXml = XElement.Parse(controller.RunTests(null)); var fullXml = new XElement("test-run", new XElement("command-line"), new XElement("filter"), frameworkXml, new XAttribute("id", 0), new XAttribute("name", 0), new XAttribute("fullname", 0), new XAttribute("testcasecount", 0), new XAttribute("result", "Passed"), new XAttribute("total", 0), new XAttribute("passed", 0), new XAttribute("failed", 0), new XAttribute("inconclusive", 0), new XAttribute("skipped", 0), new XAttribute("warnings", 0), new XAttribute("asserts", 0), new XAttribute("random-seed", 0)); SchemaTestUtils.AssertValidXml(fullXml.ToString(), "TestResult.xsd"); }); }
/// <summary> /// Construct a RunTestsAction and run all tests in the loaded TestSuite. /// </summary> /// <param name="controller">A FrameworkController holding the TestSuite to run</param> /// <param name="filter">A string containing the XML representation of the filter to use</param> /// <param name="handler">A callback handler used to report results</param> public RunTestsAction(FrameworkController controller, string filter, object handler) { controller.RunTests((ICallbackEventHandler)handler, filter); }
/// <summary> /// Construct a RunTestsAction and run all tests in the loaded TestSuite. /// </summary> /// <param name="controller">A FrameworkController holding the TestSuite to run</param> /// <param name="filter">A string containing the XML representation of the filter to use</param> /// <param name="handler">A callback handler used to report results</param> public RunTestsAction(FrameworkController controller, string filter, object handler) { controller.RunTests((ICallbackEventHandler)handler, filter); }