We hope it also will encourage and inspire active maintenance of unit tests. When using Object Oriented programming it is common for a set of unit tests to exercise all of the methods of a single class. Object technology lends itself well to this type of testing because we can fake out other objects during the test. Occasionally an individual instance of an object will need to interact with other objects within the application. Both of these techniques allow the creation of a test that exercises our object without relying upon the stability of the relating object.
Many developers believe a unit test is defined by the scope of the work being tested.
However, we prefer a more refined definition. The test can be executed in a batch-like fashion. The system is restored to its original state when the test is finished. Any rows in a database table are deleted, any files cleaned up, etc. The test exercises the smallest unit of work that makes sense to test.