Method Run
Run(Func<Task>)
Runs the specified test body inside a fresh single-threaded synchronization context and blocks until the body and all work it queued has completed.
Declaration
public static void Run(Func<Task> testBody)
Parameters
| Type |
Name |
Description |
| Func<Task> |
testBody |
|
Run<TResult>(Func<Task<TResult>>)
Runs the specified test body inside a fresh single-threaded synchronization context, blocks until the body and all work it queued has completed,
and returns the body's result.
Declaration
public static TResult Run<TResult>(Func<Task<TResult>> testBody)
Parameters
| Type |
Name |
Description |
| Func<Task<TResult>> |
testBody |
|
Returns
Type Parameters