August 2010
Intermediate to advanced
1224 pages
34h 17m
English
A good practice for your unit tests is to write them for a known state of the system; this includes the database, files, and anything that makes up the entire system. This ensures that developers can rely on these items being there when they write their tests. Of course the tests themselves often disrupt this state. You might have a test that deletes data, changes it, adds new records, and the like. In this case, you need to be able to re-initialize the state of the system prior to executing your tests (and/or after executing your tests). to ensure both a steady state to test against and a one-click test run experience for developers (another good practice for unit testing).
You typically need to write code to keep ...