Table of Contents

Method GetFixture

Namespace
Xunit
Assembly
xunit.v3.core.dll

GetFixture(Type)

Gets a fixture that was attached to the test class. Will return null if there is no exact match for the requested fixture type, or if there is no test class (that is, if TestClass returns null).

public ValueTask<object?> GetFixture(Type fixtureType)

Parameters

fixtureType Type

The exact type of the fixture

Returns

ValueTask<object>

The fixture, if available; null, otherwise

Remarks