Table of Contents

Method RegisterCodeGenTestCaseFactory

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

RegisterCodeGenTestCaseFactory(string, string, ICodeGenTestCaseFactory)

Registers the presence of an xUnit.net v3 test case factory via code generation.

public static void RegisterCodeGenTestCaseFactory(string testClassIndex, string methodName, ICodeGenTestCaseFactory 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

factory

The test case factory

Remarks

This is typically called when test methods are found during code generation. The provided factory is responsible for creating instances of ICodeGenTestCase given an input of ICodeGenTestMethod and ITestFrameworkDiscoveryOptions.