3 ms·
Writing tests, even generic ones ahead of time forces you to think about the requirements of what you're writing (edge cases, general case, etc). It doesn't mat
by pyre 15y ago
Writing tests, even generic ones ahead of time forces you to think about the requirements of what you're writing (edge cases, general case, etc). It doesn't matter if the tests need to be tweaked or even rewritten because the final implementation was different than what you envisioned.
- MostAwesomeDude 15y agoHow can you know about edge cases without knowing lower-level implementation details? How can you test behavior for a unit without understanding the code which comprises the unit? One of the tenets of TDD is not testing obvious things, and there are bunches of obvious things which can permanently eliminate corners from an implementation. Overtesting is a real danger if one dogmatically forces their tests to specify the limits of the API.
- ZeroGravitas 15y agohttp://en.wikipedia.org/wiki/Black-box_testing http://en.wikipedia.org/wiki/Black-box_testing