1 17 package servletunit.struts.tests.cactus; 18 19 import servletunit.struts.CactusStrutsTestCase; 20 21 public class TestMultipleActions extends CactusStrutsTestCase { 22 23 public TestMultipleActions(String testName) { 24 super(testName); 25 } 26 27 public void testMultipleActions() { 28 29 addRequestParameter("username","deryl"); 30 addRequestParameter("password","radar"); 31 setRequestPathInfo("/login"); 32 actionPerform(); 33 verifyForward("success"); 34 verifyForwardPath("/main/success.jsp"); 35 assertEquals("deryl",getSession().getAttribute("authentication")); 36 verifyNoActionErrors(); 37 setRequestPathInfo("/testContextParams"); 38 actionPerform(); 39 verifyNoActionErrors(); 40 } 41 42 public static void main(String [] args) { 43 junit.textui.TestRunner.run(TestMultipleActions.class); 44 } 45 46 47 } 48 49 | Popular Tags |