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

Commented Issue: NotBe for DateTime [11838]

$
0
0
dateTime.Shold().NotBe(anotherDateTime);
Comments: ** Comment from web user: brianlow **

Here is an extension method to workaround in the mean time:


public static void NotBe(this DateTimeAssertions assertions, DateTime expected)
{
Execute.Verification
.ForCondition(assertions.Subject.Value != expected)
.FailWith("Expected {0}{reason}, but found {1}.", expected, assertions.Subject.Value);
}


Viewing all articles
Browse latest Browse all 1402

Trending Articles



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