Tag Archives: TDD

Whenever I need to add a new feature to some legacy code I attempt to add some tests around the code before I start making changes. This ensures that I don’t break the original purpose of the code. This is not always easy though as some classes and methods can be difficult to get into a test harness. One example I will talk about now is that of the Irritating Parameter, which was pointed out to me in the book http://www.amazon.co.uk/Working-Effectively-Legacy-Robert-Martin/dp/0131177052. If you haven’t read this book I thoroughly recommend it as it explains ways of breaking dependencies to get classes under test, which I have found can be difficult when working with legacy code and large systems.Continue reading →