The ITestContext type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| AddAssertCount |
Adds the specified amount to the assert count atomically.
| |
| AddMetadata |
Adds metadata to the step that is running in the context.
| |
| BecomeMultiThreadAware |
This method informs the test context that it may be finished on a
different thread than it started. This changes how the test context
will exit when finished.
| |
| Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.) | |
| FinishStep |
Finishes a step and submits its final result.
| |
| SetInterimOutcome |
Sets the step's interim Outcome.
| |
| StartChildStep |
Starts a child step of the test and returns its context.
|
Properties
| Name | Description | |
|---|---|---|
| AssertCount |
Gets the current assertion count.
| |
| Data |
Gets the user data collection associated with the context.
| |
| IsFinished |
Returns true if the step associated with the context has finished execution
and completed all Finishing actions.
| |
| LifecyclePhase |
Gets or sets the lifecycle phase the context is in.
| |
| LogWriter |
Gets the log writer for the test executing in this context.
| |
| MessageSink |
Gets the message sink to which custom test messages may be published.
| |
| Outcome |
Gets the step's outcome or its interim outcome if the test is still running.
| |
| Parent |
Gets the parent context or null if this context has no parent.
| |
| Result |
Gets the final test result or null if the test has not yet finished running.
| |
| TestStep |
Gets the test step associated with the context.
|
Events
| Name | Description | |
|---|---|---|
| Finishing |
The Finishing event is raised when the test step
is finishing to perform resource reclamation or other updates.
|
