by shigemk2


97 Things Every Programmer Should Know 81 Test Precisely and Concretely

IT IS IMPORTANT TO TEST for the desired, essential behavior of a unit of code, rather than for the incidental behavior of its particular implementation.

Tests need to be both accurate and precise.

The result of adding an item to an empty collection is not simply that it is not empty: it is that the collection now has a single item, and that the single item held is the item added.

In specifying behavior, tests should not simply be accurate: they must also be precise.