Class Record
- Namespace
- Asserts
- Assembly
- xunit.v3.assert.dll
public class Record
- Inheritance
-
Record
- Inherited Members
Methods
RecordException(Action)
Records any exception which is thrown by the given code.
protected static Exception? RecordException(Action testCode)
Parameters
testCodeActionThe code which may thrown an exception.
Returns
- Exception
Returns the exception that was thrown by the code; null, otherwise.
Examples
Add an example for this method ?
Contribution guide.
RecordException(Func<object?>, string)
Records any exception which is thrown by the given code that has a return value. Generally used for testing property accessors.
protected static Exception? RecordException(Func<object?> testCode, string asyncMethodName)
Parameters
testCodeFunc<object>The code which may thrown an exception.
asyncMethodNamestringThe name of the async method the user should've called if they accidentally passed in an async function
Returns
- Exception
Returns the exception that was thrown by the code; null, otherwise.
Examples
Add an example for this method ?
Contribution guide.
RecordExceptionAsync(Func<Task>)
Records any exception which is thrown by the given task.
protected static Task<Exception?> RecordExceptionAsync(Func<Task> testCode)
Parameters
Returns
Examples
Add an example for this method ?
Contribution guide.