From: Steve F. <st...@m3...> - 2004-02-27 17:18:29
|
Dmitri Colebatch wrote: > Thanks for the information. Easy questions first - is jmock a different > project? Or a different branch on cvs? what stage of development is it > at? it's effectively a very large branch and has been moved to codehaus.org. Our intention is to move across to it entirely, although we obvious;y won't delete the previous mockobjects library. > Would you expand on "the real point is to use them to drive your > design"? In our current situation, all calls to SAP go through a > standard interface, one that (a) isn't provided by us, and (b) is > defined by concrete classes rather than abstract interfaces. I don't > see why I would want to change that design to something where the only > difference is that the interface _is_ provided by us, and conveniently > provided as an interface. this situation is much worse in the .Net world. What we tend to do is provide a very thin veneer around the third party library and mock that. The important thing is that the veneer is defined in terms of my application's domain, not the library's, so you end up with a clear definition in code of your relationship with the outside world. Keep it focussed, don't replicate everything. Anwyay, jmock will include some hooks into cglib, so you will be able to mock classes. As long as you understand what the point is. Once again, I'd recommend trying it for a while on your own code (with one of the refactoring IDEs) to get a feel for the process. S. |