Pete,
I'm seeing the same behavior... plus more weirdness. I'm using the latest CVS snapshot; I guess strutstestcase is not ready for testing those kind of Struts applications yet.
tom
Pete Gieser wrote:
Using MockStrutsCase (from release 1.9) with the following test method:
public void testManagerSuccess()
{
setRequestPathInfo("/famnet");
actionPerform();
verifyForward("success");
assertNotNull(getSession().getAttribute("members"));
verifyNoActionErrors();
}
and this section from struts-config.xml:
<action path="/famnet" type="famnet.ManagerAction">
<forward name="success" path="famnet.list" />
</action>
and this section from tiles-def.xml:
<definition name="famnet.list" path="/layout/layout.jsp"
extends="main.layout">
<put name="title" value="Members"/>
<put name="body" value="/famnet/listBody.jsp"/>
</definition>
I'm getting the following error:
processActionForward(famnet.list, false)
'famnet.list' - processed as definition
------------- ---------------- ---------------
Testcase: testManagerSuccess took 3.636 sec
FAILED
was expecting 'famnet.list' but received '/layout/layout.jsp'
junit.framework.AssertionFailedError: was expecting 'famnet.list' but
received '/layout/layout.jsp'
at servletunit.struts.Common.verifyForwardPath(Common.java:152)
at
servletunit.struts.MockStrutsTestCase.verifyForward(MockStrutsTestCase.j
ava:462)
at
struts.junit.TestManagerAction.testManagerSuccess(TestManagerAction.java
:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
Is this a bug, or is there something else I should be doing?
Pete
--
thomas quas | "The truth indeed has never been preached by the Buddha,
[EMAIL PROTECTED] | seeing that one has to realize it within oneself."
| -- Lamkara Sutra --
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

