// ****************************************************************
// This is free software licensed under the NUnit license. You
// may obtain a copy of the license as well as information regarding
// copyright ownership at http://nunit.org/?p=license&r=2.4.
// ****************************************************************
using System.Collections;
namespace NUnit.Core
{
///
/// Common interface supported by all representations
/// of a test. Only includes informational fields.
/// The Run method is specifically excluded to allow
/// for data-only representations of a test.
///
public interface ITest
{
#region Properties
///
/// Gets the completely specified name of the test
/// encapsulated in a TestName object.
///
TestName TestName { get; }
///
/// Gets a string representing the type of test, e.g.: "Test Case"
///
string TestType { get; }
///
/// Indicates whether the test can be run using
/// the RunState enum.
///
RunState RunState { get; set; }
///
/// Reason for not running the test, if applicable
///
string IgnoreReason { get; set; }
///
/// Count of the test cases ( 1 if this is a test case )
///
int TestCount { get; }
///
/// Categories available for this test
///
IList Categories { get; }
///
/// Return the description field.
///
string Description { get; set; }
///
/// Return additional properties of the test
///
IDictionary Properties { get; }
///
/// True if this is a suite
///
bool IsSuite { get; }
///
/// Gets the parent test of this test
///
ITest Parent { get; }
///
/// For a test suite, the child tests or suites
/// Null if this is not a test suite
///
IList Tests { get; }
#endregion
#region Methods
///
/// Count the test cases that pass a filter. The
/// result should match those that would execute
/// when passing the same filter to Run.
///
/// The filter to apply
/// The count of test cases
int CountTestCases(ITestFilter filter);
#endregion
}
}