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

New Post: NotBe for DateTime

$
0
0

Will do. Here is an extension method for someone in the meantime:

        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);
        }

Great project, thanks Dennis.


Viewing all articles
Browse latest Browse all 1402

Trending Articles