Writing Testable Code - Introduction

I've had a keen interest in the way testable code is different than non-testable code. To help me explore the differences more fully I plan to write a series of posts that chronicle my experiences, insights and failures.

Both test driven development (TDD) and mock objects have provided good insight into what is different at the code level for new development. However, missing from the equation is the down and dirty of dealing with GUIs, databases, and legacy code.

To start with I also am going to take the easy path of new development as I explore the development of a news aggregator similar to NewsGator (http://www.newsgator.com/) by Greg Reinacker (http://www.rassoc.com/gregr/weblog/default.aspx).

I choose this project because it is limited in scope, but still explores areas such as 3rd party libraries (MS Outlook), non-deterministic behavior (http gets) without getting into GUIs and databases.

Initial Story List:

  • Retrieve RSS feed(s) and display as posts in Outlook folder.
  • Subscribe to RSS feed

Goals:

  • Show how unit tests change the design of code
  • Show how mock objects change the design of code
  • Identify any common patterns