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

1.7.1.3 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 2002-08-09