Using TDD: "top down" vs. "bottom up"

Posted by Christian Mustica on Stack Overflow See other posts from Stack Overflow or by Christian Mustica
Published on 2010-12-31T13:11:54Z Indexed on 2010/12/31 13:53 UTC
Read the original article Hit count: 190

Filed under:

Since I'm a TDD newbie, I'm currently developing a tiny C# console application in order to practice (because practice makes perfect, right?). I started by making a simple sketchup of how the application could be organized (class-wise) and started developing all domain classes that I could identify, one by one (test first, of course).

In the end, the classes have to be integrated together in order to make the application runnable, i.e. placing necessary code in the Main method which calls the necessary logic. However, I don't see how I can do this last integration step in a "test first" manner.

I suppose I wouldn't be having these issues had I used a "top down" approach. The question is: how would I do that? Should I have started by testing the Main() method?

If anyone could give me some pointers, it will be much appreciated.

© Stack Overflow or respective owner

Related posts about TDD