Table of Contents

Method RegisterTheoryDataRowFactory

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

RegisterTheoryDataRowFactory(string, string, bool, Func<DisposalTracker, ValueTask<IReadOnlyCollection<ITheoryDataRow>>>)

Registers a source of theory data rows for a given test method.

public static void RegisterTheoryDataRowFactory(string testClassIndex, string methodName, bool disableDiscoveryEnumeration, Func<DisposalTracker, ValueTask<IReadOnlyCollection<ITheoryDataRow>>> factory)

Parameters

testClassIndex string

The dictionary index of the test class. This is the C# compilation name for the test class (in the form of global::Namespace.TypeName).

methodName string

The test method name

disableDiscoveryEnumeration bool

A flag to indicate whether enumeration should be delayed to execution time

factory Func<DisposalTracker, ValueTask<IReadOnlyCollection<ITheoryDataRow>>>

The factory providing theory data rows

Remarks

This is typically called when DataAttribute-derived classes are seen at the test method level.