Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Commented Issue: Extend ShouldThrow*() to Func [12148]

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

Func<Task> foo = async () => { await DoSthAsync(); }
foo.ShouldThrow<ArgumentNullException>();
Comments: Please neglect. Should use instead: Func<Task<HttpResponseMessage>> func = ... func.ShouldThrow<HttpResponseException>();

Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>