I am writing unit tests in c#. ShouldBeEquivalentTo
makes sense for positive cases, but for negative cases what do you use> I have not found anything like ShouldNotBeEquivalentTo
.
It doesn't exist. The best you can do is to wrap the call to ShouldBeEquivalentTo
and catch the AssertFailedException
. You could create an extension method for that.