Re: Unit tests and parameter validation
Edwin Castro <[email protected]>
| Newsgroups | gmane.comp.programming.test-driven-development |
|---|---|
| Message-ID | <[email protected]> |
On 10/15/13 11:42 AM, Eb wrote: > Interesting perspective on contracts and the requirement to pass > "correct" inputs (avoiding the use of the word valid here) to get > correct results. How does a consumer know what is correct however? A consumer must be told the specific semantics to expect. One way is to read the code. In the absence of code you must rely on documentation. Executable documentation in the form of code examples that also serve as tests for validation is just one way to communicate the semantics. -- Edwin G. Castro