Class OptionalTestResponder
Provides extension methods on IOptionalTestResponder.
Namespace: Responsible
Assembly: Responsible.dll
Syntax
public static class OptionalTestResponder
Methods
Until<T>(IOptionalTestResponder, ITestWaitCondition<T>, String, String, Int32)
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, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
IOptionalTestResponder | respondTo | Optional responders to execute until |
ITestWaitCondition<T> | condition | Condition until which responders in |
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. |
Int32 | 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 |
Type Parameters
Name | Description |
---|---|
T | Result type of both |
UntilReadyTo<T>(IOptionalTestResponder, ITestResponder<T>, String, String, Int32)
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, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
IOptionalTestResponder | respondTo | Optional responders to execute until |
ITestResponder<T> | untilReady | Responder, which is executed after it is ready to execute,
and any started responders in |
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. |
Int32 | 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 |
Type Parameters
Name | Description |
---|---|
T | Result type of both |