Chapter 8. Refactoring Legacy Code – Making it Young Again

 

"Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering."

 
 --Yoda

TDD might not adjust straightaway to legacy code. You may have to fiddle a bit with the steps to make it work. Understand that your TDD might change in this case. That, somehow, you are no longer performing the TDD you were used. This chapter will introduce you to the world of legacy code, taking as much as we can from TDD.

We'll start a fresh, with a legacy application that is currently in production. We'll alter it in small ways without introducing defects or regressions and we'll even have time to have an early lunch!

The following topics are covered in this chapter:

  • Legacy code ...

Get Test-Driven Java Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.