Re: Unit tests and parameter validation

Eb <[email protected]>
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <CANEY99aOjEiJn6onXgme=FFHFcx0==qMW5S_pqxOYWUuEh2d0Q@mail.gmail.com>
Hi Edwin -

So what's your opinion on what to actually do?  What would the tests look
like?

Thanks.

Ebenezer


On Tue, Oct 15, 2013 at 3:09 PM, Edwin Castro <[email protected]> wrote:

> 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
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


-- 
blog: http://eikonne.wordpress.com
twitter: @eikonne
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.