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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With