代码之家  ›  专栏  ›  技术社区  ›  Paul Mendoza

如果一个测试抛出一个异常和那个异常,你如何知道NUnter拆卸?[复制品]

  •  0
  • Paul Mendoza  · 技术社区  · 16 年前

    可能重复:
    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函数。如何知道生成的异常会导致它到那个异常?

    1 回复  |  直到 16 年前
        1
  •  1
  •   Community CDub    7 年前

    这已经讨论过了 here .