Method ThrowsAnyAsync
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
ThrowsAnyAsync<T>(Func<Task>)
Verifies that the exact exception or a derived exception type is thrown.
public static Task<T> ThrowsAnyAsync<T>(Func<Task> testCode) where T : Exception
Parameters
Returns
- Task<T>
The exception that was thrown, when successful
Type Parameters
TThe type of the exception expected to be thrown