Now we can supply a constructor that has the original signature. Tests can call the constructor parameterized by
mail_service, and clients can call this one. They don’t need to know that anything has changed.
- Chapter 9: I Can’t Get This Class into a Test Harness
- from Working Effectively with Legacy Code
- Publisher: Prentice Hall
- Released: September 2004
Better than using public properties.
Share this highlighthttp://www.safaribooksonline.com/a/working-effectively-with/3388261/