By dlinsin
via dlinsin.blogspot.com
Published: Sep 15 2008 / 22:18
A couple of months ago I wrote about my problem of writing test cases before the actual implementation. Last week I came across a little problem, which once again, backed up my position on the broken test first approach.
Comments
Gregg Bolinger replied ago:
The solution is so very obvious. You stub out the simplest implementation that will allow your test to pass. That means that if it is 5pm you leave at 5:05pm. Return null's, empty methods, whatever. Just make the test pass. Get to green as fast as possible. That is part of TDD.
David Linsin replied ago:
Call me petty, but stubbing out the implementation doesn't sound right....but if that's TDD, it's probably a viable solution. http://dlinsin.blogspot.com/2008/09/how-to-do-continuous-integration-and.html?showComment=1221543660000#c5371492421977390897
angsuman replied ago:
Test and the subsequent code validating it are part of each other, they either go in both or none.
Voters For This Link (8)
Voters Against This Link (3)