Table of Contents

Method SetTestContext

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

SetTestContext(TContext, TestEngineStatus)

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

protected virtual void SetTestContext(TContext ctxt, TestEngineStatus testMethodStatus)

Parameters

ctxt TContext

The context that describes the current test method

testMethodStatus

The current test method 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.