next up previous
Next: Template Up: The Design Recipe Previous: Contract and Header

Examples

Each class should include a collection of sample inputs and corresponding outputs for each method. If the body of a method contains more than one control path (e.g. a conditional statement), the collection of examples should include at least one example for each control path. The examples for each method should be included in either a test method for the class or a separate test class. We will explain how to set up tests in separate test classes later in this monograph.



Corky Cartwright 2004-02-05