Today I was #unitTesting some #predicate script (#MSDosBatch), that I thought to be easy and straightforward.
I was wrong.
The script returned both a boolean true and a boolean false for any and all input.
To catch this, your suite of unit tests MUST include negative tests, that answers questions like:
- does it return exactly 1 result, and no more?
- does it return the negative result when given a known negative input?
I was wrong.
The script returned both a boolean true and a boolean false for any and all input.
To catch this, your suite of unit tests MUST include negative tests, that answers questions like:
- does it return exactly 1 result, and no more?
- does it return the negative result when given a known negative input?