01: /*
02: * User: dxseale
03: * Date: Nov 8, 2002
04: */
05: package servletunit.struts.tests;
06:
07: import servletunit.struts.MockStrutsTestCase;
08:
09: public class TestDispatchAction extends MockStrutsTestCase {
10:
11: public TestDispatchAction(String testName) {
12: super (testName);
13: }
14:
15: public void setUp() throws Exception {
16: super .setUp();
17: setServletConfigFile("/WEB-INF/web.xml");
18: }
19:
20: public void testDispatchAction() {
21: addRequestParameter("method", "actionOne");
22: setRequestPathInfo("test", "/testDispatchAction");
23: actionPerform();
24: verifyNoActionErrors();
25: verifyForward("action1");
26: addRequestParameter("method", "actionTwo");
27: setRequestPathInfo("test", "/testDispatchAction");
28: actionPerform();
29: verifyNoActionErrors();
30: verifyForward("action2");
31:
32: }
33:
34: }
|