Interface for making test operations succeed or fail early.
public interface IExternalResultSource
Mostly intended for Unity, where the default mode is to fail tests on logged errors or exceptions.
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.
Task<T> GetExternalResult<T>(CancellationToken cancellationToken)
Cancellation token which must cancel the external result operation.
A task which will cause early failure or completion of the executed test instruction.
Type of the test instruction being executed.