5

C#で単体テストを書いています。 ShouldBeEquivalentToは正の場合には意味がありますが、負の場合には何を使用しますか> のようなものは見つかりませんでしShouldNotBeEquivalentToた。

4

1 に答える 1

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.

于 2015-12-22T11:45:12.277 に答える