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.
Being the blog of Pete Hopkins. This pirate kills fascists.
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."
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment