InvokingExtensions.Awaiting Method
Overloads
| Name | Description |
|---|---|
Awaiting<T>(T, Func<T, Task>) | Wraps an async action on the specified value for assertion testing. |
Awaiting<T, TResult>(T, Func<T, Task<TResult>>) | Wraps an async function on the specified value for assertion testing, discarding the return value. |
Awaiting<T>(T, Func<T, Task>)
Wraps an async action on the specified value for assertion testing.
c#
public static Func<Task> Awaiting<T>(this T? value, Func<T, Task> action);Type Parameters
| Name | Description |
|---|---|
T | The type of the value. |
Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to pass to the async action. |
action | Func<T, Task> | The async action to test. |
Returns
A Func<TResult> that invokes the specified async action with the value, for use with Should(Func<Task>).
Awaiting<T, TResult>(T, Func<T, Task<TResult>>)
Wraps an async function on the specified value for assertion testing, discarding the return value.
c#
public static Func<Task> Awaiting<T, TResult>(this T? value, Func<T, Task<TResult>> action);Type Parameters
| Name | Description |
|---|---|
T | The type of the value. |
TResult | The return type of the async function. |
Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to pass to the async function. |
action | Func<T, Task<TResult>> | The async function to test. |
Returns
A Func<TResult> that invokes the specified async function with the value, for use with Should(Func<Task>).