2009/4/27 Aidan Skinner <ai...@apache.org>:
> There are quite a few MockFoo and TestableFoo classes in the various
> unit tests which extend or re-implement certain core objects like
> AMQProtocolSession and MessageStore. There's also a number of
> used-by-tests-only constructors kicking about.
>
> I know some people feel quite strongly about Mocks (and their tendency
> to grow limbs), and some of the TestableFoos we have are a pain to
> maintain. One option might be to define a generic class which exposed
> all the protected members of the class it's passed as public, and then
> things which need to add test constructors can do that there. This
> would reduce the maintainence necessary for new things. We could
> convert old ones as we found ourselves in there, much like we did with
> QpidTestCase.
>
> I'm not sure if that approach solves all of the use cases for the
> existing Mock things, but it certainly would solve some of them.
>
> How much use do other people think this would be, and (I guess
> slightly more pertinently) would it be worth the effort?
>
> - Aidan
> --
> Apache Qpid - Give me convenience or give me death
> http://qpid.apache.org
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscr...@qpid.apache.org

Any sort of improvement to our testing to ensure that we are testing
our code not our Mock objects is a win for me.

Having a common base class for the Java broker tests like we do with
QpidTestCase in systests would be a good change.

Martin

-- 
Martin Ritchie

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to