Jeremy Miller has posted Another Gold Nugget of "Intro To TDD" info, concerning the Unit Test LOC to Production LOC ratio. From his post:
Ian Cooper recently wrote about the Ratio of test code to production code. Ian is saying that he's routinely seeing a 1:1 or even 1.5:1 ratio of test code to production code. From my experience with TDD, that's about normal. Some kinds of code will go even higher. For example, any kind of significant recursive functionality will make the ratio go throught the roof (a Visitor/Composite pattern combo is central to StoryTeller. That jacks up the test code LOC relative to the real code LOC significantly).
All I want to add to Ian's post is that that number should not discourage newcomers to TDD.
I've heard many a TDD newcomer complain about the number of unit tests compared to the number production methods, as well as the ammount of unit test code (Lines Of Code) compared to production code. I can't tell you how difficult it is to explain to a new TDD developer, that it should be that way and for good reason - I have a very hard time articulating the benefit (yet another example of "how much do I really know?"). Hopefully, pointing people to Jeremy's post can help them understand, and help me articulate the benefits. I highly recomment reading the entire post.