Resolved in PR #1054
Description
AsyncFunctionAssertions has non-async methods in common with ActionAssertions (i.e. Throw, NotThrow). However, these are implemented separately for AsyncFunctionAssertions and this has lead to:
- Redundant code from duplicate logic
- Inconsistent error messages between the similar methods. I.e. Throw for AsyncFunctionAssertions may output a slightly different error message to the same method contained within ActionAssertions.
- Overhead of a developer when modifying the behaviour of one of these common methods, as the implementation has to be duplicated.
My proposal is to make AsyncFunctionAssertions a subclass of ActionAssertions. This ensures that any methods available for an Action are also available for a synchronous call to a Func<Task>.