Mocking Legacy Code

MockingLegacyCode is not about making fun of other people's code, it's about MockObjects.

LegacyCode, especially when it is SpaghettiCode, can be quite hard to test. One powerful technique for UnitTestingLegacyCode is using MockObjects. I've found that there is a moderately steep cost to set up the initial MockObjects, but the payoff is big because MockObjects have a high reuse factor.

AlittleMockGoesAlongWay. See MockingInManyLanguages for examples.


CategoryMockObjects | CategoryTesting


EditText of this page (last edited May 21, 2003) or FindPage with title or text search