Summary Motley: A simple if-then-else hook is the simplest and best way to inject a mock object. Maven: First, you have to design to interfaces. Then, techniques like dependency injection, factories, and endo-testing are more effective ways to inject
Read More...
Summary Motley: I can't mock something that I have no control over (like third-party or old legacy code) Maven: Design to interfaces, create a wrapper, and use tools for mocking. These are all great practices for leveraging mock objects. ______________________________
Read More...
Summary Motley: Unit tests take too long to execute. I'm not going to bother. Maven: Unit tests need to run quickly - you need to execute them frequently. Mock objects can help. ______________________________ [Context: Motley has been writing unit tests
Read More...