Table of Contents

Interface ITestFrameworkDiscoverer

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

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

ITestAssembly

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

callback Func<ITestCase, ValueTask<bool>>

Called for each discovered test. Return true to continue test discovery; return false to cancel test discovery.

discoveryOptions ITestFrameworkDiscoveryOptions

The options used by the test framework during discovery.

types Type[]

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.

cancellationToken CancellationToken?

The optional cancellation token which can be used to cancel the test discovery process.

Returns

ValueTask