Allows the user to record actions for a test.
More...
|
static Exception | Exception (Action testCode) |
| Records any exception which is thrown by the given code. More...
|
|
static Exception | Exception (Func< object > testCode) |
| Records any exception which is thrown by the given code that has a return value. Generally used for testing property accessors. More...
|
|
static Exception | Exception (Func< Task > testCode) |
|
static async Task< Exception > | ExceptionAsync (Func< Task > testCode) |
| Records any exception which is thrown by the given task. More...
|
|
Allows the user to record actions for a test.
◆ Exception() [1/2]
static Exception Xunit.Record.Exception |
( |
Action |
testCode | ) |
|
|
inlinestatic |
Records any exception which is thrown by the given code.
- Parameters
-
testCode | The code which may throw an exception. |
- Returns
- Returns the exception that was thrown by the code; null, otherwise.
◆ Exception() [2/2]
static Exception Xunit.Record.Exception |
( |
Func< object > |
testCode | ) |
|
|
inlinestatic |
Records any exception which is thrown by the given code that has a return value. Generally used for testing property accessors.
- Parameters
-
testCode | The code which may throw an exception. |
- Returns
- Returns the exception that was thrown by the code; null, otherwise.
◆ ExceptionAsync()
static async Task<Exception> Xunit.Record.ExceptionAsync |
( |
Func< Task > |
testCode | ) |
|
|
inlinestatic |
Records any exception which is thrown by the given task.
- Parameters
-
testCode | The task which may throw an exception. |
- Returns
- Returns the exception that was thrown by the code; null, otherwise.
The documentation for this class was generated from the following file:
- xunit/src/xunit.core/Record.cs