Miroslav, It depends on what level you want to mock at. I rarely need to mock to test classes inside a component, but if I want to test a component (a collaborating group of classes) then I will want to mock its dependencies - either because of the baggage they bring along with them, or because I've not got beyond establishing the component interface, or because I want to be certain that any abnormal behaviour is due to defects in the component under test and not a dependency.
Too much mocking to test individual classes inside a component smacks of tight coupling and/or poor assignment of responsibilities and/or a too-procedural coding style... Phil. On Mar 3, 11:16 am, Miroslav Pokorny <[email protected]> wrote: > Heres a crazy question, does the need for a mocking framework imply that > perhaps theres something wrong w/ your design ? Why cant you simply create > the necessary interface and assert the inputs and return some output ? > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
