Tests should always occur in as much isolation as is reasonable.
Class A requires the services of some class that implements interface B. I can write a "mock B", implementing this interface, which returns dummy data (or stores passed information), as necessary in support of the test. If Class A has a hard dependency on class B, then I can't mock it out. Now I'm not just testing A, I'm also testing B. Static classes yield hard dependencies. Hard dependencies don't test well. On 7/17/06, Shawn Wildermuth <[EMAIL PROTECTED]> wrote:
Can you explain "mock out"?
=================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com