Class TestSuite
TestSuite represents a composite test, which contains other tests.
public class TestSuite : Test, ITest, IXmlNodeBuilder, IComparable
- Inheritance
-
TestSuite
- Implements
- Derived
- Inherited Members
Constructors
TestSuite(string)
Initializes a new instance of the TestSuite class.
public TestSuite(string name)
Parameters
name
stringThe name of the suite.
TestSuite(string, string)
Initializes a new instance of the TestSuite class.
public TestSuite(string parentSuiteName, string name)
Parameters
TestSuite(Type)
Initializes a new instance of the TestSuite class.
public TestSuite(Type fixtureType)
Parameters
fixtureType
TypeType of the fixture.
Properties
Arguments
The arguments to use in creating the fixture
public 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
MaintainTestOrder
Set to true to suppress sorting this suite's contents
protected bool MaintainTestOrder { get; set; }
Property Value
TestCaseCount
Gets a count of test cases represented by or contained under this test.
public override int TestCaseCount { 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
Add(Test)
Adds a test to the suite.
public void Add(Test test)
Parameters
test
TestThe test.
Add(object)
Adds a pre-constructed test fixture to the suite.
public void Add(object fixture)
Parameters
fixture
objectThe fixture.
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
CheckSetUpTearDownMethods(Type)
Check that setup and teardown methods marked by certain attributes meet NUnit's requirements and mark the tests not runnable otherwise.
protected void CheckSetUpTearDownMethods(Type attrType)
Parameters
attrType
TypeThe attribute type to check for
MakeTestResult()
Overridden to return a TestSuiteResult.
public override TestResult MakeTestResult()
Returns
- TestResult
A TestResult for this test.
Sort()
Sorts tests under this suite.
public void Sort()