Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 c# 编写单元测试。 ShouldBeEquivalentTo对于积极的情况是有意义的,但对于消极的情况,你用什么>我没有找到类似的东西ShouldNotBeEquivalentTo。
ShouldBeEquivalentTo
ShouldNotBeEquivalentTo
它不存在。您可以做的最好的事情是将调用包装起来ShouldBeEquivalentTo并捕获AssertFailedException. 您可以为此创建一个扩展方法。
AssertFailedException