struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Holser" <Paul.Hol...@wnco.com>
Subject mock objects for unit testing struts actions
Date Wed, 01 Aug 2001 13:11:54 GMT
i would like to write JUnit tests for my struts Action classes.  these would
test that certain attributes have been added to the servlet request, an
appropriate ActionForward object is returned, and so forth.  i looked into
the MockObjects library on sourceforge...but it seems that a lot of the
methods on the MockHttpServletRequest are no-ops or return null.

am i to understand that i must subclass MockHttpServletRequest and
add in whatever stubbed-out functionality i want?  or are there other
"mock objects" libraries for the servlet API that will better suit my needs?

cheers,
p



Mime
View raw message