In this post I will share some of the TDD heuristics that I have found useful on when you should use mocking to verify interactions and when should you resort to state verification.

Its often assumed that legacy code should not be refactored because no one knows what worms are hidden in that can and what kind of monstrous bugs will be unleashed upon the users if that code is refactored. In some cases, it does seem to hold however, done in smaller chunks to the code that […]