2
using System.Collections;
7
/// TestNode represents a single test or suite in the test hierarchy.
8
/// TestNode holds common info needed about a test and represents a
9
/// single node - either a test or a suite - in the hierarchy of tests.
11
/// TestNode extends TestInfo, which holds all the information with
12
/// the exception of the list of child classes. When constructed from
13
/// a Test, TestNodes are always fully populated with child TestNodes.
15
/// Like TestInfo, TestNode is purely a data class, and is not able
18
/// TODO: Complete TestNode implementation
21
/// TestNode has replaced UITestNode, previously defined
22
/// in the nunit.util assembly.
24
/// TestResult now uses TestNode. The TestRunner Load methods
25
/// all return a TestNode. Test objects are no longer passed
26
/// back to the client.
28
/// Currently TestNode implements ITest and so duplicates much
29
/// of the functionality of Test. In the future, the ITest interface
30
/// will be simplified and Test will either extend or aggregate
33
/// TestNodes should contain enough info to allow a runner
34
/// to locate the actual test object and execute it.
38
public class TestNode : TestInfo
40
#region Instance Variables
42
/// For a test suite, the child tests or suites
43
/// Null if this is not a test suite
45
private ArrayList tests;
50
/// Construct from a Test
52
/// <param name="test">Test from which a TestNode is to be constructed</param>
53
public TestNode ( ITest test ) : base( test )
57
this.tests = new ArrayList();
59
foreach( ITest child in test.Tests )
61
TestNode node = new TestNode( child );
62
this.Tests.Add( node );
70
/// Array of child tests, null if this is a test case.
72
public ArrayList Tests