Re:Preconditions Should be Checked Explicitly
by thethomaseffect on Tuesday April 02, 2013 @09:24AM
(#5479092)
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.
If they did turn out to be a bottleneck in the future then modifying or even removing them shouldn't affect visible behavior.