1 18 package org.apache.struts.taglib.html; 19 20 import java.util.Locale ; 21 22 import javax.servlet.jsp.PageContext ; 23 import junit.framework.Test; 24 import junit.framework.TestSuite; 25 26 import org.apache.cactus.JspTestCase; 27 import org.apache.struts.Globals; 28 import org.apache.struts.taglib.SimpleBeanForTesting; 29 30 35 public class TestFormTag1 extends JspTestCase { 36 37 42 public TestFormTag1(String theName) { 43 super(theName); 44 } 45 46 51 public static void main(String [] theArgs) { 52 junit.awtui.TestRunner.main(new String [] {TestFormTag1.class.getName()}); 53 } 54 55 59 public static Test suite() { 60 return new TestSuite(TestFormTag1.class); 62 } 63 64 private void runMyTest(String whichTest, String locale) throws Exception { 65 pageContext.setAttribute(Globals.LOCALE_KEY, new Locale (locale, locale), PageContext.SESSION_SCOPE); 66 pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE); 67 request.setAttribute("runTest", whichTest); 68 pageContext.forward("/test/org/apache/struts/taglib/html/TestFormTag1.jsp"); 69 } 70 71 74 public void testFormAction() throws Exception { 75 runMyTest("testFormAction", ""); 76 } 77 public void testFormActionEnctype() throws Exception { 78 runMyTest("testFormActionEnctype", ""); 79 } 80 public void testFormActionAcceptCharset() throws Exception { 81 runMyTest("testFormActionAcceptCharset", ""); 82 } 83 public void testFormActionFocus() throws Exception { 84 runMyTest("testFormActionFocus", ""); 85 } 86 public void testFormActionFocusIndexed() throws Exception { 87 runMyTest("testFormActionFocusIndexed", ""); 88 } 89 public void testFormActionMethod1() throws Exception { 90 runMyTest("testFormActionMethod1", ""); 91 } 92 public void testFormActionMethod2() throws Exception { 93 runMyTest("testFormActionMethod2", ""); 94 } 95 public void testFormActionMethod3() throws Exception { 96 runMyTest("testFormActionMethod3", ""); 97 } 98 public void testFormActionMethod4() throws Exception { 99 runMyTest("testFormActionMethod4", ""); 100 } 101 public void testFormActionMethod5() throws Exception { 102 runMyTest("testFormActionMethod5", ""); 103 } 104 public void testFormActionOnreset() throws Exception { 105 runMyTest("testFormActionOnreset", ""); 106 } 107 public void testFormActionOnsubmit() throws Exception { 108 runMyTest("testFormActionOnsubmit", ""); 109 } 110 public void testFormActionStyle() throws Exception { 111 runMyTest("testFormActionStyle", ""); 112 } 113 public void testFormActionStyleClass() throws Exception { 114 runMyTest("testFormActionStyleClass", ""); 115 } 116 public void testFormActionStyleId() throws Exception { 117 runMyTest("testFormActionStyleId", ""); 118 } 119 public void testFormActionTarget() throws Exception { 120 runMyTest("testFormActionTarget", ""); 121 } 122 123 124 125 126 127 128 } 129 | Popular Tags |