• Home
  • .NET
  • Unity
  • Godot
  • Design Overview
  • API Documentation
  • Changelog
  • GitHub
Show / Hide Table of Contents
  • Responsible
    • BddExtensions
    • IExternalResultSource
    • IFailureListener
    • IGlobalContextProvider
    • IOptionalTestResponder
    • ITestInstruction<T>
    • ITestOperation<T>
    • ITestResponder<T>
    • ITestScheduler
    • ITestWaitCondition<T>
    • LinqSupport
    • OptionalTestResponder
    • RepetitionLimitExceededException
    • Responsibly
    • TestFailureException
    • TestInstruction
    • TestInstructionExecutor
    • TestInstructionExecutor.StateNotificationCallback
    • TestOperationState
    • TestResponder
    • TestWaitCondition
  • Responsible.Bdd
    • IBddStep
    • Keywords
    • ScenarioBuilder
  • Responsible.Context
    • RunContext
  • Responsible.Docs
    • Inherit
  • Responsible.State
    • ITestOperationState
    • ITestOperationState<T>
    • StateStringBuilder
    • TestOperationStateTransition
    • TestOperationStatus
  • Responsible.Unity
    • TestOperationYieldInstruction<T>
    • UnhandledLogMessageException
    • UnityErrorLogInterceptor
    • UnityFailureListener
    • UnityTestInstructionExecutor
    • UnityTestScheduler
  • Responsible.Utilities
    • IMultipleTaskAwaiter<T>
    • IMultipleTaskSource<T>
    • IndentedStringBuilder<T>
    • RetryingPoller

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.

In this article
Back to top Generated by DocFX