Interface ITestFrameworkDiscoverer
Represents an implementation of the discovery part of a test framework. Implementations may optionally implement IDisposable and/or IAsyncDisposable for cleanup operations.
public interface ITestFrameworkDiscoverer
Properties
TestAssembly
Gets the test assembly provided to the discoverer.
ITestAssembly TestAssembly { get; }
Property Value
Methods
Find(Func<ITestCase, ValueTask<bool>>, ITestFrameworkDiscoveryOptions, Type[]?, CancellationToken?)
Finds tests inside an assembly. Calls the callback for each discovered test.
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.discoveryOptionsITestFrameworkDiscoveryOptionsThe 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.