Should it be “Arrange-Assert-Act-Assert”?

后端 未结 14 2508
不思量自难忘°
不思量自难忘° 2020-11-30 19:53

Regarding the classic test pattern of Arrange-Act-Assert, I frequently find myself adding a counter-assertion that precedes Act. This way I know that the passing assertion

14条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 20:59

    It could also be specified as Arrange-Assume-Act-Assert.

    There is a technical handle for this in NUnit, as in the example here: http://nunit.org/index.php?p=theory&r=2.5.7

提交回复
热议问题