1 5 package servletunit.struts.tests.cactus; 6 7 import servletunit.struts.CactusStrutsTestCase; 8 9 public class TestDispatchAction extends CactusStrutsTestCase { 10 11 public TestDispatchAction(String testName) { 12 super(testName); 13 } 14 15 public void testDispatchAction() { 16 addRequestParameter("method","actionOne"); 17 setRequestPathInfo("test","/testDispatchAction"); 18 actionPerform(); 19 verifyNoActionErrors(); 20 verifyForward("action1"); 21 addRequestParameter("method","actionTwo"); 22 setRequestPathInfo("test","/testDispatchAction"); 23 actionPerform(); 24 verifyNoActionErrors(); 25 verifyForward("action2"); 26 } 27 28 } 29 | Popular Tags |