Table of Contents

Class FixtureMappingManager

Namespace
Xunit.v3
Assembly
xunit.v3.core.aot.dll

Maps fixture objects using code-generated factories.

public class FixtureMappingManager : IAsyncDisposable
Inheritance
FixtureMappingManager
Implements
Inherited Members

Remarks

Open generic fixtures are not supported (meaning, you can register SomeType<int>, but not SomeType<>), since all factories must be code generated ahead of time.

Constructors

FixtureMappingManager(string, IReadOnlyDictionary<Type, FixtureFactory>, FixtureMappingManager?)

Maps fixture objects using code-generated factories.

FixtureMappingManager(string, object[])

FOR TESTING PURPOSES ONLY.

Properties

FixtureFactories

Gets the fixture factories.

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

ForNotification<T>()

Gets fixtures that desire specific test lifecycle notifications.

GetFixture(Type)

Get a value for the given fixture type. If the fixture type is unknown, then returns null.

GetFixture<T>()

Get a value for the given fixture type. If the fixture type is unknown, then returns default.

InitializeAsync(bool)

Initializes the known fixture types, optionally creating the instances ahead of time.

TryGetFixtureArgument<T>()

Tries to get a fixture argument to help construct a fixture. The potential fixed argument types are supported (e.g., IMessageSink and ITestContextAccessor), as well as consulting the parent mapping manager.

TryGetFixtureArgument<T>(FixtureMappingManager?)

Tries to get a fixture argument to help construct a fixture. The potential fixed argument types are supported (e.g., IMessageSink, ITestContextAccessor, and ITestOutputHelper), as well as consulting the mapping manager.

TryGetFixture<T>()

Tries to get a strongly typed fixture value.