1 // ****************************************************************
\r
2 // This is free software licensed under the NUnit license. You
\r
3 // may obtain a copy of the license as well as information regarding
\r
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.
\r
5 // ****************************************************************
\r
7 using System.Collections;
\r
12 /// Common interface supported by all representations
\r
13 /// of a test. Only includes informational fields.
\r
14 /// The Run method is specifically excluded to allow
\r
15 /// for data-only representations of a test.
\r
17 public interface ITest
\r
21 /// Gets the completely specified name of the test
\r
22 /// encapsulated in a TestName object.
\r
24 TestName TestName { get; }
\r
27 /// Gets a string representing the type of test, e.g.: "Test Case"
\r
29 string TestType { get; }
\r
32 /// Indicates whether the test can be run using
\r
33 /// the RunState enum.
\r
35 RunState RunState { get; set; }
\r
38 /// Reason for not running the test, if applicable
\r
40 string IgnoreReason { get; set; }
\r
43 /// Count of the test cases ( 1 if this is a test case )
\r
45 int TestCount { get; }
\r
48 /// Categories available for this test
\r
50 IList Categories { get; }
\r
53 /// Return the description field.
\r
55 string Description { get; set; }
\r
58 /// Return additional properties of the test
\r
60 IDictionary Properties { get; }
\r
63 /// True if this is a suite
\r
65 bool IsSuite { get; }
\r
68 /// Gets the parent test of this test
\r
70 ITest Parent { get; }
\r
73 /// For a test suite, the child tests or suites
\r
74 /// Null if this is not a test suite
\r
76 IList Tests { get; }
\r
81 /// Count the test cases that pass a filter. The
\r
82 /// result should match those that would execute
\r
83 /// when passing the same filter to Run.
\r
85 /// <param name="filter">The filter to apply</param>
\r
86 /// <returns>The count of test cases</returns>
\r
87 int CountTestCases(ITestFilter filter);
\r