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

Reopened Issue: Better readability with extension methods on int [10087]

$
0
0
Include Minutes(), Hours() and Days() extension methods on integers, for better readability of DateTime assertions.
For example:

public static TimeSpan Minutes(this int source)
{
return TimeSpan.FromMinutes(source);
}

This allows assertions like:

theDateTime.Should().BeLessThan(10.Minutes().Before(otherDateTime));
Comments: ** Comment from web user: dennisdoomen **

Should be closed after the release


Viewing all articles
Browse latest Browse all 1402

Trending Articles



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