Objects have dependencies. Methods don't
Posted by: Jeffrey Palermo,
on 11 Mar 2008 |
View original | Bookmarked: 0 time(s)
There is quite a bit of talk lately about unit testing using the extract method and override, or "inherit & override" method for stubbing out a method for unit testing. Methods don't have dependencies, and methods aren't dependencies. Objects are dependencies, and object have dependencies. One object will depend on another object. Objects are cohesive and present a contract of behavior so other objects know what behavior they can reliably leverage. Because...