3 ms·
What I really like about the author's approach is that it really answers the first question: "How can we validate that our API is working as intended?" Writing
by btrombley 12y ago
What I really like about the author's approach is that it really answers the first question: "How can we validate that our API is working as intended?"
Writing your tests from the client's perspective actually gives you that certainty. TDD is a powerful tool, but in my experience its evangelists get into overly academic debates about exactly what a "unit" is and how strictly you should adhere to the red-green-refactor steps.
For a really thoughtful and in-depth approach to API TDD I recommend Growing Object-Oriented Software, Guided by Tests by Steve Freeman (http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627/ref=pd_sim_b_4?ie=UTF8&refRID=1RR860ZTZZANQ3VFZHAA http://www.amazon.com/Growing-Object-Oriented-Software-Guide...).