Opposite ShouldBeEquivalentTo

I am writing unit tests in C #. ShouldBeEquivalentTomakes sense for positive cases, but for negative cases that you use> I did not find anything like it ShouldNotBeEquivalentTo.

+4
source share
1 answer

He does not exist. The best you can do is wrap the call ShouldBeEquivalentToand catch AssertFailedException. You can create an extension method for it.

+5
source

Source: https://habr.com/ru/post/1621175/


All Articles