Class FixtureMappingManager
Maps fixture objects, including support for generic collection fixtures.
public class FixtureMappingManager : IAsyncDisposable
- Inheritance
-
FixtureMappingManager
- Implements
- Inherited Members
Remarks
Initializes a new instance of the FixtureMappingManager class.
Constructors
FixtureMappingManager(string, object[])
FOR TESTING PURPOSES ONLY.
protected FixtureMappingManager(string fixtureCategory, object[] cachedFixtureValues)
Parameters
FixtureMappingManager(string, FixtureMappingManager?)
Maps fixture objects, including support for generic collection fixtures.
public FixtureMappingManager(string fixtureCategory, FixtureMappingManager? parentMappingManager = null)
Parameters
fixtureCategorystringThe category of fixture (i.e., "Assembly"); used in exception messages
parentMappingManagerFixtureMappingManagerThe parent mapping manager (used to resolve constructor arguments)
Remarks
Initializes a new instance of the FixtureMappingManager class.
Properties
GlobalFixtureTypes
Returns a list of all known fixture types at all category levels.
public IReadOnlyCollection<Type> GlobalFixtureTypes { get; }
Property Value
LocalFixtureTypes
Returns a list of the known fixture types at this category level. This will not include fixture types known from parent categories and above.
public IReadOnlyCollection<Type> LocalFixtureTypes { get; }
Property Value
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
GetFixture(Type)
Get a value for the given fixture type. If the fixture type is unknown, then returns null.
public ValueTask<object?> GetFixture(Type fixtureType)
Parameters
fixtureTypeTypeThe type of the fixture
Returns
InitializeAsync(IReadOnlyCollection<Type>)
public ValueTask InitializeAsync(IReadOnlyCollection<Type> fixtureTypes)
Parameters
fixtureTypesIReadOnlyCollection<Type>
Returns
InitializeAsync(params Type[])
public ValueTask InitializeAsync(params Type[] fixtureTypes)
Parameters
fixtureTypesType[]