Book Review: Test Driven Development in .NET

Test Driven Development in .NET

Test Driven Development in .NET
James W. Newkirk
Alexsei A. Vorontsov
©2004 Microsoft Press

Over the past couple years since I first purchased this title I have picked it up, put it down, picked it up again ad infinitum. I really wanted to like this book. I’m a huge fan of TDD, Agile Development, Extreme Programming, etc. which puts me right at the sweet spot of this book’s intended audience.

The authors are very well known in the TDD world: Alexei Vorontsov is one of the people behind NUnit, and James Newkirk has been heavily involved in the Visual Studio family of products at Microsoft, along with numerous Agile/TDD-type projects including CodePlex and xUnit (Note to self: check out xUnit, it looks interesting).

The book received about a four-star average rating on, with a relatively high variance. I just don’t agree. Here’s my take:

The book has too much depth and not enough breadth. The authors drill down fairly quickly into an in-depth discussion of implementing a set of database-driven web services for providing music information, complete with extended discussions of mocks, stubs, Fowler-esque Data Transfer Objects, and much more. Meanwhile, some of the broad outlines of TDD remain unexplored, such as the arguments for and against using Mock Objects in the first place.

The book has a consistently misplaced emphasis: witness page 15, where the authors implicitly introduce the [SetUp()] idea without explanation, or page 22, where they introduce [ExpectedException()] in a section titled “Pop a Stack that has no elements”, or the fact that the book’s index contains no entries for Mock Objects, Code Coverage, or TestFixture.

The authors violate “pure” TDD principles. Examples: page 76, where they introduce a new XSD without any tests; page 119, where they introduce null checks without corresponding tests; or page 167, where they fail to test for a thrown SoapException. Now I’m not in favor of any TDD purity tests, necessarily, but in a book about TDD you’d think that the authors would adhere more closely to the principles, if only to avoid leading newbies astray.

In summary: smart authors; but the book could be much better.


0 Responses to “Book Review: Test Driven Development in .NET”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

TwitterCounter for @anthonyrstevens
Add to Technorati Favorites

RSS Feed

View Anthony Stevens's profile on LinkedIn

%d bloggers like this: