Class TestMethod
The TestMethod class represents a Test implemented as a method.
public class TestMethod : Test, ITest, IXmlNodeBuilder, IComparable, IComparable<Test>
- Inheritance
-
TestMethod
- Implements
- Inherited Members
Constructors
TestMethod(IMethodInfo)
Initializes a new instance of the TestMethod class.
public TestMethod(IMethodInfo method)
Parameters
method
IMethodInfoThe method to be used as a test.
TestMethod(IMethodInfo, Test?)
Initializes a new instance of the TestMethod class.
public TestMethod(IMethodInfo method, Test? parentSuite)
Parameters
method
IMethodInfoThe method to be used as a test.
parentSuite
TestThe suite or fixture to which the new test will be added
Properties
Arguments
The arguments to use in executing the test method, or empty array if none are provided.
public override object?[] Arguments { get; }
Property Value
- object[]
HasChildren
Gets a bool indicating whether the current test has any descendant tests.
public override bool HasChildren { get; }
Property Value
Method
Gets a MethodInfo for the method implementing this test.
public IMethodInfo Method { get; set; }
Property Value
MethodName
Returns the name of the method
public override string MethodName { 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(TNode, bool)
Returns a TNode representing the current result after adding it as a child of the supplied parent node.
public override TNode AddToXml(TNode parentNode, bool recursive)
Parameters
Returns
MakeTestResult()
Overridden to return a TestCaseResult.
public override TestResult MakeTestResult()
Returns
- TestResult
A TestResult for this test.