Refactoring towards seams in C
Michael Ruegg, Peter Sommerlad · Automation of Software Test · 2012
Breaking dependencies is an important task in refactoring legacy code. With the help of Feathers' seams we gain the power to unit test our legacy code base because they enable us to inject dependencies from outside. Although seams are a valuable technique, it is hard and cumbersome to apply them without automated refactorings and tool chain configuration support. We show how to create seams in C++ by using new refactorings. To automate this task, we provide sophisticated IDE support. Our reference implementation creates the boilerplate code and the necessary infrastructure for the four presented seam types object, compile, preprocessor and link seam.