Amit Ajmani wrote:
Hi All ,
How can i test my server through Junit. ?
I want to test my ProtocolDecoderFilter and IOHandler. basically my client
open a connection with server and send bytes which i filtered using
CumulativeProtocolDecoderFilter and wrapped the bytes into high level object
and passed to IOhandler. and sends response back to client.
How could i test my server for above using Junit.
Any suggestions
Thanks
Amit
In an earlier message I described a technique for doing. In a nutshell:
rather than doing a full-blown start-up of the server, and opening a
connection to it, you simulate it. You set up a dummy server
environment for your decoders/handlers, send a message to it, and then
verify the response that comes back.
Details - and sample code - here:
http://www.nabble.com/Re%3A-Exceptions-in-MINA-p23930764.html
HTH,
DR