directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: Test Design
Date Fri, 18 Mar 2005 00:51:58 GMT
Hi,

On Thu, 17 Mar 2005 14:03:50 -0500, Enrique Rodriguez
<erodriguez@apache.org> wrote:
> Berin Loritsch wrote:
> <snip/>
> > If the code does not allow us to pass in our own streams then that would
> > be a point for refactoring to make the system more friendly to testing.
> > That would also releave the need to poke holes in personal firewalls
> > just so the test can run (something Linux developers need to do).  It
> > also reduces the points of failure and makes it plainly obvious what is
> > an accurately encoded messgae.  Hopefully it will also avoid the problem
> > where the library is consistent with itself but not with production LDAP
> > servers.
> 
> Is there anything we can do with MINA here, perhaps a test mode or a
> filter that effectively disables port binding and can shunt traffic to
> test code?  MINA seems the obvious place to put in this sort of test
> support.

To test messages, you can just call encode(...) and decode(...)
method.  ProtocolEncoderOuput, ProtocolDecoderOutput, and
ProtocolSession should be mock objects in this case.

To test ProtocolHandlers, you can just call their event handler
methods.  Of course, you'll have to use mock objects heavily.

Trustin.
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message