Table of Contents

Method FindTestsForType

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

FindTestsForType(IXunitTestClass, ITestFrameworkDiscoveryOptions, Func<ITestCase, ValueTask<bool>>)

Core implementation to discover unit tests in a given test class.

protected override ValueTask<bool> FindTestsForType(IXunitTestClass testClass, ITestFrameworkDiscoveryOptions discoveryOptions, Func<ITestCase, ValueTask<bool>> discoveryCallback)

Parameters

testClass

The test class.

discoveryOptions

The options used by the test framework during discovery.

discoveryCallback Func<ITestCase, ValueTask<bool>>

The callback that is called for each discovered test case. The return value of the callback indicates the same thing as the return value of this function: return true to continue discovery, or false to halt it.

Returns

ValueTask<bool>

Returns true if discovery should continue; false otherwise.