5

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.

Rob
  • 26,989
  • 16
  • 82
  • 98
Aaron
  • 4,380
  • 19
  • 85
  • 141
  • http://stackoverflow.com/questions/20693872/c-sharp-fluent-assertions-global-options-for-shouldbeequivalentto – MethodMan Dec 21 '15 at 23:56

1 Answers1

5

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.

Dennis Doomen
  • 8,368
  • 1
  • 32
  • 44