Method UpdateTestContext
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
UpdateTestContext(object?, TestResultState?)
Updates the test context values while the test is running, without swapping out the test context itself. This preserves the values in the existing context (notably, the cancellation token, which is wrapped and passed, and as such cannot be replaced).
protected virtual void UpdateTestContext(object? testClassInstance, TestResultState? testState = null)
Parameters
testClassInstanceobjecttestState