On Sunday, October 5, 2003, at 02:28 PM, Erik Hatcher wrote:


I'm curious what your take of the two mocks I've recently added to Lucene's codebase is - MockFilter and MockInputStream. Both of these are for sending in to somewhere else and probing what happens to them. How else could a Real Deal (tm) work in these scenarios? And, I would argue that these two are the real deals since they merely are implementations (although certainly minimal and exploratory) of the real interfaces of Lucene.

I looked at both of these and I think that in this case neither of them seems an 'abuse' of mocking. If anything, this is the exact usage of what a mock should be, whiteboxing a blackbox scenario, where you can interact with it, then poke about and verify the results of that interaction.

I don't know if you're used dynamic mocks or the big fat library of mocks in the mockobjects-java project, but THAT stuff to me is a pretty blatant abuse. Full (useless) mocks of all of j2ee, where you're endlessly forced to define expectations and results for every call. Yuck!

Hani


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to