Method TryGetFixture
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.aot.dll
TryGetFixture<T>()
Tries to get a strongly typed fixture value.
public ValueTask<(bool Success, T? Result)> TryGetFixture<T>()
Returns
- ValueTask<(bool Success, T Result)>
The result with a flag which indicates whether it was successful
Type Parameters
TThe fixture type
Remarks
This only returns fixture values, which differs from TryGetFixtureArgument<T>() which will also return values for supported non-fixture argument types (like ITestContextAccessor or ITestOutputHelper).