在 NUnit TearDown 上,如何知道测试是否抛出异常以及该异常是什么?
我有一堆 NUnit 测试,它们都继承自实现 NUnit Teardown 函数的类。
[拆除] public void TeardownTest() { }
每当其中一个测试生成异常时,它就会直接跳转到 TearDown 函数。 我如何知道生成的异常是什么导致它进入该异常?
Possible Duplicate:
In the teardown event during an NUnit test how can I get to the attribute applied to the method that was just tested?
I have an bunch of NUnit tests that all inherit from a class that implements the NUnit Teardown function.
[TearDown]
public void TeardownTest() { }
Whenever one of the tests generate an exception it just jumps straight to the TearDown function. How do I know what the exception was that was generated that caused it to go to that exception?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这已经讨论过 此处。
This has been already discussed here.