NUnit, is it possible to continue executing test after Assert fails?

前端 未结 9 2187
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 19:42

In a test that contains some asserts, for example:

Assert.AreEqual(1,1);
Assert.AreEqual(2,1);
Assert.AreEqual(2,2);

is it possible to let

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 20:25

    No. Typically in this situation you would put all the code above the asserts into a setup method, then write each assert into its own test case.

提交回复
热议问题