Method Find
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
Find(Func<ITestCase, ValueTask<bool>>, ITestFrameworkDiscoveryOptions, Type[]?, CancellationToken?)
Finds tests inside an assembly. Calls the callback for each discovered test.
public virtual ValueTask Find(Func<ITestCase, ValueTask<bool>> callback, ITestFrameworkDiscoveryOptions discoveryOptions, Type[]? types = null, CancellationToken? cancellationToken = null)
Parameters
callbackFunc<ITestCase, ValueTask<bool>>Called for each discovered test. Return true to continue test discovery; return false to cancel test discovery.
discoveryOptionsThe options used by the test framework during discovery.
typesType[]When passed a non-null collection, only returns tests found from one of the provided types; when passed a null collection, discovers all tests in the assembly.
cancellationTokenCancellationToken?The optional cancellation token which can be used to cancel the test discovery process.