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