Table of Contents

Class TestFrameworkDiscoverer<TTestClass>

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

A base implementation of ITestFrameworkDiscoverer that supports test filtering and runs the discovery process on a thread pool thread.

public abstract class TestFrameworkDiscoverer<TTestClass> : ITestFrameworkDiscoverer, IAsyncDisposable where TTestClass : class, ITestClass

Type Parameters

TTestClass

The test class object model type. Must derive from ITestClass.

Inheritance
TestFrameworkDiscoverer<TTestClass>
Implements
Derived
Inherited Members

Constructors

TestFrameworkDiscoverer(ITestAssembly)

A base implementation of ITestFrameworkDiscoverer that supports test filtering and runs the discovery process on a thread pool thread.

Properties

DisposalTracker

Gets the disposal tracker for the test framework discoverer.

TestAssembly

Gets the test assembly.

Methods

CreateTestClass(Type)

Implement this method to create a test class for the given CLR type.

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

Find(Func<ITestCase, ValueTask<bool>>, ITestFrameworkDiscoveryOptions, Type[]?, CancellationToken?)

Finds tests inside an assembly. Calls the callback for each discovered test.

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

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

GetExportedTypes()

Override this to provide a list of the exported types in the assembly.

IsValidTestClass(Type)

Determines if a type should be used for discovery. Can be used to filter out types that are not desirable. The default implementation filters out abstract (non-static) classes.