When do I use the TestFixtureSetUp attribute instead of a default constructor?

前端 未结 9 1203
旧巷少年郎
旧巷少年郎 2021-01-30 15:59

The NUnit documentation doesn\'t tell me when to use a method with a TestFixtureSetup and when to do the setup in the constructor.

public class MyTe         


        
9条回答
  •  误落风尘
    2021-01-30 16:25

    The constructor and the SetUp methods are used differently:
    The constructor is run only once.
    However, the SetUp methods are run multiple times, before every test case is executed.

提交回复
热议问题