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 TestTextTag1 extends JspTestCase { 36 37 42 public TestTextTag1(String theName) { 43 super(theName); 44 } 45 46 51 public static void main(String [] theArgs) { 52 junit.awtui.TestRunner.main(new String [] {TestTextTag1.class.getName()}); 53 } 54 55 59 public static Test suite() { 60 return new TestSuite(TestTextTag1.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/TestTextTag1.jsp"); 69 } 70 71 74 public void testTextProperty() throws Exception { 75 runMyTest("testTextProperty", ""); 76 } 77 public void testTextPropertyAccesskey() throws Exception { 78 runMyTest("testTextPropertyAccesskey", ""); 79 } 80 public void testTextPropertyAlt() throws Exception { 81 runMyTest("testTextPropertyAlt", ""); 82 } 83 public void testTextPropertyAltKey1() throws Exception { 84 runMyTest("testTextPropertyAltKey1", ""); 85 } 86 public void testTextPropertyAltKey2() throws Exception { 87 runMyTest("testTextPropertyAltKey2", ""); 88 } 89 public void testTextPropertyAltKey3() throws Exception { 90 runMyTest("testTextPropertyAltKey3", ""); 91 } 92 public void testTextPropertyAltKey_fr1() throws Exception { 93 runMyTest("testTextPropertyAltKey1_fr", "fr"); 94 } 95 public void testTextPropertyAltKey_fr2() throws Exception { 96 runMyTest("testTextPropertyAltKey2_fr", "fr"); 97 } 98 public void testTextPropertyDisabled() throws Exception { 99 runMyTest("testTextPropertyDisabled", ""); 100 } 101 public void testTextPropertyMaxlength() throws Exception { 102 runMyTest("testTextPropertyMaxlength", ""); 103 } 104 public void testTextPropertyOnblur() throws Exception { 105 runMyTest("testTextPropertyOnblur", ""); 106 } 107 public void testTextPropertyOnchange() throws Exception { 108 runMyTest("testTextPropertyOnchange", ""); 109 } 110 public void testTextPropertyOnclick() throws Exception { 111 runMyTest("testTextPropertyOnclick", ""); 112 } 113 public void testTextPropertyOndblclick() throws Exception { 114 runMyTest("testTextPropertyOndblclick", ""); 115 } 116 public void testTextPropertyOnfocus() throws Exception { 117 runMyTest("testTextPropertyOnfocus", ""); 118 } 119 public void testTextPropertyOnkeydown() throws Exception { 120 runMyTest("testTextPropertyOnkeydown", ""); 121 } 122 public void testTextPropertyOnkeypress() throws Exception { 123 runMyTest("testTextPropertyOnkeypress", ""); 124 } 125 public void testTextPropertyOnkeyup() throws Exception { 126 runMyTest("testTextPropertyOnkeyup", ""); 127 } 128 public void testTextPropertyOnmousedown() throws Exception { 129 runMyTest("testTextPropertyOnmousedown", ""); 130 } 131 public void testTextPropertyOnmousemove() throws Exception { 132 runMyTest("testTextPropertyOnmousemove", ""); 133 } 134 public void testTextPropertyOnmouseout() throws Exception { 135 runMyTest("testTextPropertyOnmouseout", ""); 136 } 137 public void testTextPropertyOnmouseover() throws Exception { 138 runMyTest("testTextPropertyOnmouseover", ""); 139 } 140 public void testTextPropertyOnmouseup() throws Exception { 141 runMyTest("testTextPropertyOnmouseup", ""); 142 } 143 144 } 145 | Popular Tags |