Page 1 of 1

Refactoring issue with an "extract class"

Posted: Fri Aug 26, 2005 10:08 am
by nielsene
As discussed here, I decided to refactor my FrontDispatcher, pulling out a factory class.

The FrontDispatcher was heavily mocked, so it was heavily interaction testing. The factory methods that were pulled out were all private and thus not tested explicitly.

Following the extraction of the Factory Class and the updating of the interaction based mock tests, I'm back to a green bar. However, there is absolutely no test harness surrounding the Factory... This feels very wierd.

I guess its because I hadn't done the extra tests McGruff described with the file writing to create testable classes for the factory to produce, etc. Had I had those tests then I would have had some tests to move to the Factory test classes....