On 3/5/06, E. Saynatkari <none / none.net> wrote:
> Esad Hajdarevic wrote:
> If your unit tests do not cover everything, how can
> any other kinds? :)
>
> > Esad

These are two different issues.

Your asserts/contracts should check that the methods are being passed
what they expect to be passed to them.  Postconditions will probably
check some invariants on the results of the methods.

Your test should not test what the contracts already check.  The tests
should check that if you pass correct values you get the expected
results.

Eg: assume that you have a method that takes only positive numbers.
you will have a contract/assertion checking that you don't pass any
negatives and a test suite that checks that, given a set of positive
inputs, you get the correct outputs.

--
-- Chiaroscuro --
Liquid Development Blog: //http://liquiddevelopment.blogspot.com