You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by da...@daune-consult.com on 2005/06/14 15:58:10 UTC

[Mina] CumulativeProtocolDecoder testing

Hi all,

I have implemented my own subclass of CumulativeProtocolDecoder, and I am about
to test it.

I planned to pass a null object as session in CumulativeProtocolDecoder.decode,
but unfortunately, the test at the beginning of this method requires a valid
instance.

I noticed that in CumulativeProtocolDecoderTest, Trustin ran into the same
trouble.

What do you think about moving ProtocolSessionImpl out of
CumulativeProtocolDecoderTest so that it can be reused ?

I don't know where such utility test classes should stand, but I do know they
would be useful.

Regards,

J-F


Re: [Mina] CumulativeProtocolDecoder testing

Posted by Vinod Panicker <vi...@gmail.com>.
On 6/14/05, daune.jf@daune-consult.com <da...@daune-consult.com> wrote:
> Hi all,
> 
> I have implemented my own subclass of CumulativeProtocolDecoder, and I am about
> to test it.
> 
> I planned to pass a null object as session in CumulativeProtocolDecoder.decode,
> but unfortunately, the test at the beginning of this method requires a valid
> instance.
> 
> I noticed that in CumulativeProtocolDecoderTest, Trustin ran into the same
> trouble.
> 
> What do you think about moving ProtocolSessionImpl out of
> CumulativeProtocolDecoderTest so that it can be reused ?
> 
> I don't know where such utility test classes should stand, but I do know they
> would be useful.

Testing apps like MINA is always a problem.  Our app that uses MINA
also ran into the same set of problems.  We've ended up using mock
objects (easymock) and wired together a test hierarchy that provides
"utility" and "setup" services.  It might be overkill most of the
times, but we need extensive test support.

Maybe it might make sense for MINA to make use of mock objects (IIRC
there was something in MINA that was using mock objects)

Regards,
Vinod.