• 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 ITestOperationState<T>

Represents the execution status of a test operation run created with CreateState().

Mostly intended for internal use.

Inherited Members
ITestOperationState.Status
ITestOperationState.BuildDescription(StateStringBuilder)
Namespace: Responsible.State
Assembly: Responsible.dll
Syntax
public interface ITestOperationState<out T> : ITestOperationState
Type Parameters
Name Description
T

Return type of the test operation.

Remarks

All implementations of ITestOperationState<T> in Responsible have an override of ToString(), which will produce a full textual representation of the execution state.

Methods

ExecuteUnsafe<TResult>(RunContext, CancellationToken)

Starts execution of the the operation this state was created from.

Intended for internal use only.

Declaration
Task<TResult> ExecuteUnsafe<TResult>(RunContext runContext, CancellationToken cancellationToken)
Parameters
Type Name Description
RunContext runContext

The test operation run context this run is part of.

CancellationToken cancellationToken

Cancellation token for canceling the run.

Returns
Type Description
Task<TResult>

An task, which will complete with the result of the operation, or an error on failure.

Type Parameters
Name Description
TResult
Remarks

Due to lack of support for covariant generic classes and constraints in C#, we have to use this unsafe method. However, it is used only from an extension method, which does the correct type inference for us, so overall, things are safe.

Extension Methods

TestOperationState.ToTask<T>(ITestOperationState<T>, TestInstructionExecutor, CancellationToken, string, string, int)
TestOperationState.ToYieldInstruction<T>(ITestOperationState<T>, TestInstructionExecutor, bool, CancellationToken, string, string, int)
In this article
Back to top Generated by DocFX