ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Inspection: NUnit. Async test method should return Task or Task<T>

Last modified: 21 July 2022

Async test methods in NUnit 3.x must return either Task if no value is returned, or Task<T> if a value of type T is returned. Below are two situations where async tests will not be working correctly.

In both situations you need to rewrite test methods so that they return either Task or Task<T>.