Table of Contents

Method SetTestContext

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

SetTestContext(TContext, TestEngineStatus)

Sets the current TestContext for the current test case and the given test case status.

protected virtual void SetTestContext(TContext ctxt, TestEngineStatus testCaseStatus)

Parameters

ctxt TContext

The context that describes the current test case

testCaseStatus

The current test case status.

Remarks

This method must never throw. Behavior is undefined if it does. Instead, exceptions that occur should be recorded in the aggregator in ctxt and will be reflected in a way that's appropriate based on when this method is called.