Wednesday, December 17

Flaw: Constructor does Real Work

Flaw: Constructor does Real Work: "Fundamentally, “Work in the Constructor” amounts to doing anything that makes instantiating your object difficult or introducing test-double objects difficult."

Misko has a great article about making sure that your constructors permit your class to be reasonably testable. Read the whole thing, his detailed examples are very informative.