4 ms·
Good article as usual, I'd argue that in TDD preconditions are absolutely critical because otherwise your tests cannot possibly be considered complete. At the e
by thethomaseffect 14y ago
Good article as usual, I'd argue that in TDD preconditions are absolutely critical because otherwise your tests cannot possibly be considered complete.
At the end of the day preconditions usually amount to
if (valid)
continue
else
throw
If they did turn out to be a bottleneck in the future then modifying or even removing them shouldn't affect visible behavior.
- Strilanc 14y agoYes, tests are a good way to ensure the behavior of invalid cases stays consistent.