Interface IExternalResultSource
Interface for making test operations succeed or fail early.
Namespace: Responsible
Assembly: Responsible.dll
Syntax
public interface IExternalResultSource
Remarks
Mostly intended for Unity, where the default mode is to fail tests on logged errors or exceptions.
Methods
GetExternalResult<T>(CancellationToken)
This method will be called when starting to execute a test instruction with TestInstructionExecutor. If it completes with an error or result, the test instruction will be canceled, and the root operation will complete with the returned result or failure.
Declaration
Task<T> GetExternalResult<T>(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Cancellation token which must cancel the external result operation. |
Returns
Type | Description |
---|---|
Task<T> | A task which will cause early failure or completion of the executed test instruction. |
Type Parameters
Name | Description |
---|---|
T | Type of the test instruction being executed. |