1

Closed

Extend ShouldThrow*() to Func<Task>

description

Extend the ShouldThrow*() methods for Func<Task> too so you can work with async methods:

Func<Task> foo = async () => { await DoSthAsync(); }
foo.ShouldThrow<ArgumentNullException>();
Closed Aug 25, 2012 at 2:19 PM by
All done with the public beta of Fluent Assertions 2.0

comments

dennisdoomen wrote May 17, 2012 at 6:17 AM

Sounds like a great idea!

wrote May 21, 2012 at 6:37 PM

Associated with changeset 77737.

wrote Jun 12, 2012 at 6:54 PM

Associated with changeset 78947: WinRT support for ShouldThrow(this Func asyncAction, ..)

wrote Jun 13, 2012 at 3:57 PM

Associated with changeset 78979: Included AsyncFunctionExceptionAssertionSpecs in the WinRT specs project

masantiago wrote Mar 25 at 5:06 PM

Could it be also included in Windows Phone package? It'd be really useful for a asynchronous-like interface as WP. Currently, I see it is only available in WinRT.