Freddy,
It would be "really" nice if there was a way to have say
MockServletContext initialize itself from a web.xml file. That would be
extremely useful when attempting to test things like Stripersist w/
Spring, etc...
So when are you going to submit a patch to Stripes? ;-) :-) :-)
--Nikolaos
Freddy Daoud wrote:
I use TestNG and have Stripersist, Stripes, Spring, etc... running in a
test without issues. It takes quite a bit of work to model the key
parts of your web.xml to get Stripersist to work. Once its done it
works great.
FWIW, with Rayures[1], you can subclass TestWithMockContainer and
override getWebXmlPath() to return the path to a copy of your web.xml
file (on the classpath; I usually copy it over to src/test/resources
and trim out the irrelevant parts), and it will configure the Stripes
mock framework for you, saving much of the work that Nikolaos
rightfully mentions.
For examples, look at the tests for Rayures itself, such as
src/test/java/com/fdaoud/rayures/action/PersonActionBeanTest.java.
I haven't made a release yet.. ongoing 2.0 development is in
the trunk.
[1]:http://code.google.com/p/rayures
Cheers,
Freddy
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users