Table of Contents

Class TestAssembly

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

TestAssembly is a TestSuite that represents the execution of tests in a managed assembly.

public class TestAssembly : TestSuite, ITest, IXmlNodeBuilder, IComparable, IComparable<Test>
Inheritance
TestAssembly
Implements
Inherited Members

Constructors

TestAssembly(TestAssembly, ITestFilter)

Creates a copy of the given assembly with only the descendants that pass the specified filter.

public TestAssembly(TestAssembly assembly, ITestFilter filter)

Parameters

assembly TestAssembly

The TestAssembly to copy.

filter ITestFilter

Determines which descendants are copied.

TestAssembly(Assembly, string)

Initializes a new instance of the TestAssembly class specifying the Assembly and the suite name.

public TestAssembly(Assembly assembly, string assemblyNameOrPath)

Parameters

assembly Assembly

The assembly this test represents.

assemblyNameOrPath string

This becomes the full name of the suite and the filename part is used as the suite name.

TestAssembly(string)

Initializes a new instance of the TestAssembly class specifying the suite name for an assembly that could not be loaded.

public TestAssembly(string assemblyNameOrPath)

Parameters

assemblyNameOrPath string

This becomes the full name of the suite and the filename part is used as the suite name.

Properties

Assembly

Gets the Assembly represented by this instance.

public Assembly? Assembly { get; }

Property Value

Assembly

TestType

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

public override string TestType { get; }

Property Value

string

Methods

Copy(ITestFilter)

Creates a filtered copy of the test suite.

public override TestSuite Copy(ITestFilter filter)

Parameters

filter ITestFilter

Determines which descendants are copied.

Returns

TestSuite

GetCustomAttributes<TAttr>(bool)

Get custom attributes specified on the assembly

public override TAttr[] GetCustomAttributes<TAttr>(bool inherit) where TAttr : class

Parameters

inherit bool

Returns

TAttr[]

Type Parameters

TAttr