Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opposite of ShouldBeEquivalentTo

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.

like image 707
Aaron Avatar asked Dec 21 '15 23:12

Aaron


1 Answers

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.

like image 180
Dennis Doomen Avatar answered Oct 16 '22 09:10

Dennis Doomen