StrutsSpringTestCase extends StrutsTestCase which extends another class that
depends on JUnit 3 not JUnit 4.
So you cannot use JUnit 4 annotations and the SpringJUnit4ClassRunner.
You may find this blog article helpful:
http://www.brucephillips.name/blog/index.cfm/2009/12/2/Using-JUnit-To-Test
1. Yes. The LoginAction is annotated with @Namespace("/login"), and
the register() action is annotated with @Action(value="register").
2. I'm not sure what you're saying. Since StrutsTestCase initializes
this to a new object, why do I need to check for null?
On Sat, Mar 12, 2011 at 7:43 PM, Marti
1)does /login/register exist in your struts webapp?
2)in StrutsTestCase
protected void initServletMockObjects() {
request = new MockHttpServletRequest();
//check request for null before referencing the request object later on
Martin Gainty
___
3 matches
Mail list logo