代码之家  ›  专栏  ›  技术社区  ›  goofballLogic

nunit测试:如果抛出非预期异常,是否保证IDisposable?

  •  4
  • goofballLogic  · 技术社区  · 15 年前

    If I create an IDisposable during the TestFixtureSetup of an NUnit test, and the test throws an unanticipated exception (e.g. external resource fails), will the IDisposable's Dispose() get called?

    增加& gt;
    如果不是,nunit是否提供TestFixtureTowardown或其他可用于清理的地方的保证执行?

    1 回复  |  直到 15 年前
        1
  •  6
  •   Darin Dimitrov    15 年前

    IDisposable using Dispose TestFixtureTearDown 不过。

    推荐文章