Class TestMethod
The TestMethod class represents a Test implemented as a method.
public class TestMethod : Test, ITest, IXmlNodeBuilder, IComparable
- Inheritance
-
TestMethod
- Implements
- Inherited Members
Constructors
TestMethod(MethodInfo)
Initializes a new instance of the TestMethod class.
public TestMethod(MethodInfo method)
Parameters
method
MethodInfoThe method to be used as a test.
TestMethod(MethodInfo, Test)
Initializes a new instance of the TestMethod class.
public TestMethod(MethodInfo method, Test parentSuite)
Parameters
method
MethodInfoThe method to be used as a test.
parentSuite
TestThe suite or fixture to which the new test will be added
Properties
HasChildren
Gets a bool indicating whether the current test has any descendant tests.
public override bool HasChildren { get; }
Property Value
Tests
Gets this test's child tests
public override IList<ITest> Tests { get; }
Property Value
XmlElementName
Gets the name used for the top-level element in the XML representation of this test
public override string XmlElementName { get; }
Property Value
Methods
AddToXml(XmlNode, bool)
Returns an XmlNode representing the current result after adding it as a child of the supplied parent node.
public override XmlNode AddToXml(XmlNode parentNode, bool recursive)
Parameters
Returns
MakeTestResult()
Overridden to return a TestCaseResult.
public override TestResult MakeTestResult()
Returns
- TestResult
A TestResult for this test.