Method SetTestContext
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
SetTestContext(TContext, TestEngineStatus, TestResultState?, object?)
Sets the test context for the given test state and engine status.
protected virtual void SetTestContext(TContext ctxt, TestEngineStatus testStatus, TestResultState? testState = null, object? testClassInstance = null)
Parameters
ctxtTContextThe context that describes the current test
testStatusThe current engine status for the test
testStateThe current test state
testClassInstanceobjectThe instance of the test class
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.