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
trueto continue test discovery; returnfalseto cancel test discovery.discoveryOptionsThe options used by the test framework during discovery.
typesType[]When passed a non-
nullcollection, only returns tests found from one of the provided types; when passed anullcollection, discovers all tests in the assembly.cancellationTokenCancellationToken?The optional cancellation token which can be used to cancel the test discovery process.