May 2018
Intermediate to advanced
300 pages
7h 35m
English
The test context setup is done in the test class constructor, since the test setup is not applicable in xUnit. For every test, xUnit creates a new instance of the test class, which implies that the codes in the class constructor are run for each test.
Oftentimes, it is desirable for unit test classes to share a test context because it can be expensive to create and clean up test contexts. xUnit offers three approaches to achieve this:
You should use constructor and ...