• 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

Class OptionalTestResponder

Provides extension methods on IOptionalTestResponder.

Inheritance
object
OptionalTestResponder
Namespace: Responsible
Assembly: Responsible.dll
Syntax
public static class OptionalTestResponder

Methods

UntilCompletionOf<T>(IOptionalTestResponder, ITestInstruction<T>, string, string, int)

Executes responders in respondTo, until a test instruction execution is completed. All responders are guaranteed to either complete or not start execution at all. No responders are required to execute. A failure in any of the responders, or the instruction, will also cause the returned wait condition to complete with a failure.

Declaration
[Pure]
public static ITestWaitCondition<T> UntilCompletionOf<T>(this IOptionalTestResponder respondTo, ITestInstruction<T> instruction, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Parameters
Type Name Description
IOptionalTestResponder respondTo

Optional responders to execute until instruction is completed.

ITestInstruction<T> instruction

Instruction until the completion of which responders in respondTo are executed.

string memberName

Caller member name provided by compiler. May be overridden for custom operators.

string sourceFilePath

Caller file path provided by compiler. May be overridden for custom operators.

int sourceLineNumber

Source line number provided by compiler. May be overridden for custom operators.

Returns
Type Description
ITestWaitCondition<T>

A wait condition which completes with the value of instruction once it and all started responders have completed.

Type Parameters
Name Description
T

Result type of both instruction, and the returned wait condition.

UntilReadyTo<T>(IOptionalTestResponder, ITestResponder<T>, string, string, int)

Executes responders in respondTo, until untilReady is ready to execute, and continues executing untilReady afterwards. All responders are guaranteed to either complete or not start execution at all. No responders in respondTo are required to execute. A failure in any of the responders will also cause the returned responder to complete with a failure.

Declaration
[Pure]
public static ITestResponder<T> UntilReadyTo<T>(this IOptionalTestResponder respondTo, ITestResponder<T> untilReady, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Parameters
Type Name Description
IOptionalTestResponder respondTo

Optional responders to execute until untilReady is ready to execute.

ITestResponder<T> untilReady

Responder, which is executed after it is ready to execute, and any started responders in respondTo have finished executing.

string memberName

Caller member name provided by compiler. May be overridden for custom operators.

string sourceFilePath

Caller file path provided by compiler. May be overridden for custom operators.

int sourceLineNumber

Source line number provided by compiler. May be overridden for custom operators.

Returns
Type Description
ITestResponder<T>

A test responder which completes with the value of untilReady, once it and all started responders from respondTo have completed.

Type Parameters
Name Description
T

Result type of both untilReady, and the returned responder.

Until<T>(IOptionalTestResponder, ITestWaitCondition<T>, string, string, int)

Executes responders in respondTo, until a condition is met. All responders are guaranteed to either complete or not start execution at all. No responders are required to execute. A failure in any of the responders, or the wait condition, will also cause the returned wait condition to complete with a failure.

Declaration
[Pure]
public static ITestWaitCondition<T> Until<T>(this IOptionalTestResponder respondTo, ITestWaitCondition<T> condition, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Parameters
Type Name Description
IOptionalTestResponder respondTo

Optional responders to execute until condition is met.

ITestWaitCondition<T> condition

Condition until which responders in respondTo are executed.

string memberName

Caller member name provided by compiler. May be overridden for custom operators.

string sourceFilePath

Caller file path provided by compiler. May be overridden for custom operators.

int sourceLineNumber

Source line number provided by compiler. May be overridden for custom operators.

Returns
Type Description
ITestWaitCondition<T>

A wait condition which completes with the value of condition once it and all started responders have completed.

Type Parameters
Name Description
T

Result type of both condition, and the returned wait condition.

In this article
Back to top Generated by DocFX