Table of Contents

Method SetForTestMethod

Namespace
Xunit
Assembly
xunit.v3.core.dll

SetForTestMethod(ITestMethod, TestEngineStatus, CancellationToken)

Sets the test context for execution of a test method. This assumes an existing test context already exists from which it can pull the diagnostic and internal diagnostic message sinks.

public static void SetForTestMethod(ITestMethod testMethod, TestEngineStatus testMethodStatus, CancellationToken cancellationToken)

Parameters

testMethod

The test method that is being executed

testMethodStatus

The test method status (valid values: Initializing, Running, and CleaningUp)

cancellationToken CancellationToken

The cancellation token used to cancel execution