RunTests() публичный Метод

Runs the tests in an assembly synchronously reporting back the test results through the callback or through the return value
public RunTests ( Action callback, string filter ) : string
callback Action The callback that receives the test results
filter string A string containing the XML representation of the filter to use
Результат string
Пример #1
0
        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");
            });
        }
Пример #2
0
 /// <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);
 }
Пример #3
0
 /// <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);
 }