Refactoring long legacy methods

Refactoring long methods without tests can be difficult, adding tests for long methods requires Refactoring… In order to break this bind, Michael Feathers is working on a tool for Java that seems promising: Vise .

Vise enables a programmer to inspect values inside methods, and then test (with unit tests) and inspect these values, so at least when refactoring the programmer can be sure nothing has changed, and can get some confidence that all branches have been covered.

Vise should lower the barrier for testing and refactoring legacy code – when old complex code is not refactored, new more complex code is ‘wrapped around’ it, and no-one dares touch the old code anymore.

0 Responses to “Refactoring long legacy methods”


  1. No Comments

Leave a Reply




Switch to our mobile site