<PackageReference Include="NUnit" Version="4.5.0" />

NUnit.Framework.Internal.Test

public abstract class Test : ITest, IXmlNodeBuilder, IComparable, IComparable<Test>
public static string IdPrefix { get; set; }

public abstract object[] Arguments { get; }

public string ClassName { get; }

public virtual object Fixture { get; set; }

public string FullName { get; set; }

public abstract bool HasChildren { get; }

public string Id { get; set; }

public bool IsSuite { get; }

public IMethodInfo Method { get; set; }

public virtual string MethodName { get; }

public string Name { get; set; }

public ITest Parent { get; set; }

public IPropertyBag Properties { get; }

public RunState RunState { get; set; }

public int Seed { get; set; }

public IMethodInfo[] SetUpMethods { get; protected set; }

public IMethodInfo[] TearDownMethods { get; protected set; }

public virtual int TestCaseCount { get; }

public abstract IList<ITest> Tests { get; }

public virtual string TestType { get; }

Gets a string representing the type of test. Used as an attribute value in the XML representation of a test and has no other function in the framework.

public ITypeInfo TypeInfo { get; }

Gets the TypeInfo of the fixture used in running this test or null if no fixture type is associated with it.

public abstract string XmlElementName { get; }

Gets the name used for the top-level element in the XML representation of this test

protected Test(string name)

Constructs a test given its name

protected Test(string pathName, string name)

Constructs a test given the path through the test hierarchy to its parent and a name.

protected Test(ITypeInfo typeInfo)

Constructs a test for a specific type.

protected Test(IMethodInfo method)

Constructs a test for a specific method.

public abstract TNode AddToXml(TNode parentNode, bool recursive)

Returns an XmlNode representing the current result after adding it as a child of the supplied parent node.

Modify a newly constructed test by applying any of NUnit's common attributes, based on a supplied ICustomAttributeProvider, which is usually the reflection element from which the test was constructed, but may not be in some instances. The attributes retrieved are saved for use in subsequent operations.

public void ApplyAttributesToTest(Type type)

Recursively apply the attributes on type to this test, including attributes on nesting types.

Apply the attributes to the test.

public int CompareTo(object obj)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Test other)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public virtual TAttr[] GetCustomAttributes<TAttr>(bool inherit)

Get custom attributes applied to a test

protected IEnumerable<Type> GetNestedTypes(Type inner)

Returns all nested types, inner first.

public void MakeInvalid(string reason)

Mark the test as Invalid (not runnable) specifying a reason

public void MakeInvalid(Exception exception, string reason)

Mark the test as Invalid (not runnable) specifying a reason and an exception.

public abstract TestResult MakeTestResult()

Creates a TestResult for this test.

protected void PopulateTestNode(TNode thisNode, bool recursive)

Add standard attributes and members to a test node.

public TNode ToXml(bool recursive)

Returns the XML representation of the test