可能重复: In the teardown event during an NUnit test how can I get to the attribute applied to the method that was just tested?
我有一堆nunit测试,它们都继承自实现nunit teardown函数的类。
[拆卸] public void teardowntest(){}
每当其中一个测试生成异常时,它就会直接跳到teardown函数。如何知道生成的异常会导致它到那个异常?
这已经讨论过了 here .