Too Long; Didn't Read
Most of us will work with this type of legacy code at some stage. Trying to add tests can be very difficult. If the code has been written without tests, then chances are it is tightly coupled with other parts of the system. In order to work effectively and produce robust solutions we need to have a few techniques in our arsenal to make the code testable. After reading ‘The Art of Unit Testing’ by Roy Osherove I’ve been experimenting with the techniques recommended in the book. Below, I’ll work through the 3 techniques I use most regularly.