Table of Contents

Interface ITest

Namespace
NUnit.Framework.Interfaces
Assembly
nunit.framework.dll

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 : IXmlNodeBuilder
Inherited Members

Properties

FixtureType

Gets the Type of the test fixture, if applicable, or null if no fixture type is associated with this test.

Type FixtureType { get; }

Property Value

Type

FullName

Gets the fully qualified name of the test

string FullName { get; }

Property Value

string

HasChildren

Gets a bool indicating whether the current test has any descendant tests.

bool HasChildren { get; }

Property Value

bool

Id

Gets the id of the test

int Id { get; }

Property Value

int

IsSuite

Returns true if this is a test suite

bool IsSuite { get; }

Property Value

bool

Method

Gets a MethodInfo for the method implementing this test. Returns null if the test is not implemented as a method.

MethodInfo Method { get; }

Property Value

MethodInfo

Name

Gets the name of the test

string Name { get; }

Property Value

string

Parent

Gets the parent test, if any.

ITest Parent { get; }

Property Value

ITest

The parent test or null if none exists.

Properties

Gets the properties of the test

IPropertyBag Properties { get; }

Property Value

IPropertyBag

RunState

Gets the RunState of the test, indicating whether it can be run.

RunState RunState { get; }

Property Value

RunState

TestCaseCount

Count of the test cases ( 1 if this is a test case )

int TestCaseCount { get; }

Property Value

int

Tests

Gets this test's child tests

IList<ITest> Tests { get; }

Property Value

IList<ITest>

A list of child tests