1. Buy some of the TDD books. There are quite a few good ones out there.
2. In your case, create a concrete subclass of the ServletOutputStream
that writes to a StringBuffer and compare the result at the end of the
test. Once you're used to that, we can consider what to do next.
S.
On 16 Sep 2008, at 05:21, Sushil Dodake wrote:
> Hi All,
> i am trying to write a test case for a struts action call.
> in the action call i am trying to send a file on the response output
> stream.
> when i get the output stream using response.getOutputstream i get a
> object
> of ServletOurtputStream.
> which is a abstract class..
> i then write a byte stream on the output stream and fluch it to close
> i am confused as to how to write a test case.
> can sombody help me here?
> any example?
>
> regards,
>
> Sush
Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006
http://www.m3p.co.ukM3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email