1 package servletunit.struts.tests.cactus; 17 18 import servletunit.struts.*; 19 20 28 public class TestNullPointerAction extends CactusStrutsTestCase { 29 30 public TestNullPointerAction() { 31 } 32 33 public void setUp() throws Exception { 34 super.setUp(); 35 } 36 37 public void testNullPointer() throws Exception { 38 try{ 39 this.setRequestPathInfo("test","/testNullPointer"); 40 this.actionPerform(); 41 fail("Exception expected"); 42 }catch(ExceptionDuringTestError e){ 43 } 47 } 48 49 public void testNullPointerFromForm() throws Exception { 50 try{ 51 this.setRequestPathInfo("test","/testNullPointerForm"); 52 this.actionPerform(); 53 fail("Exception expected"); 54 }catch(ExceptionDuringTestError e){ 55 } 59 } 60 61 62 public static void main(String [] args) { 63 junit.textui.TestRunner.run(TestNullPointerAction.class); 64 } 65 66 } | Popular Tags |