Tuesday, December 14, 2004

Unit tests and large refactorings

I was doing a large refactoring today, clearing up the Snapshot pattern (ala Martin Fowler) in our system today. The refactoring is separating responsibility and changing some messy code into some cleaner code.

About half the time I was fixing the code. The other half of the time was fixing the tests. Some were badly written tests, which the cleanup revealed. Alotof the time was dealing with Unit tests, which made some assumptions about the implementation (because, well, that is what they do).

The unit tests were of no use in the refactoring - the business facing tests however revealed all.

People at work are calling me the Unit test bigot.

0 Comments:

Post a Comment

<< Home