Table of Contents

Class TestFixture

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

TestFixture is a surrogate for a user test fixture class, containing one or more tests.

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

Constructors

TestFixture(ITypeInfo, Exception)

Initializes a new instance of the TestFixture class that failed to load.

public TestFixture(ITypeInfo fixtureType, Exception ex)

Parameters

fixtureType ITypeInfo

Type of the fixture.

ex Exception

Exception that was thrown during test discovery.

TestFixture(ITypeInfo, object?[]?)

Initializes a new instance of the TestFixture class.

public TestFixture(ITypeInfo fixtureType, object?[]? arguments = null)

Parameters

fixtureType ITypeInfo

Type of the fixture.

arguments object[]

Arguments used to instantiate the test fixture, or null if none used

Properties

LifeCycle

The life cycle specified for the current test fixture.

public LifeCycle LifeCycle { get; set; }

Property Value

LifeCycle

TypeInfo

Gets the TypeInfo of the fixture used in running this test.

public ITypeInfo TypeInfo { get; }

Property Value

ITypeInfo

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