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 54 public class TestMultiboxTag2 extends JspTestCase { 55 56 61 public TestMultiboxTag2(String theName) { 62 super(theName); 63 } 64 65 70 public static void main(String [] theArgs) { 71 junit.awtui.TestRunner.main(new String [] {TestMultiboxTag2.class.getName()}); 72 } 73 74 78 public static Test suite() { 79 return new TestSuite(TestMultiboxTag2.class); 81 } 82 83 private void runMyTest(String whichTest, String locale) throws Exception { 84 pageContext.setAttribute(Globals.LOCALE_KEY, 85 new Locale (locale, locale), 86 PageContext.SESSION_SCOPE); 87 88 String [] s = new String [7]; 89 for(int i = 1; i < 7; i++){ 90 s[i] = "value" + i; 91 } 92 SimpleBeanForTesting sbft = new SimpleBeanForTesting(s); 93 94 pageContext.setAttribute(Constants.BEAN_KEY, sbft, PageContext.REQUEST_SCOPE); 95 request.setAttribute("runTest", whichTest); 96 pageContext.forward("/test/org/apache/struts/taglib/html/TestMultiboxTag2.jsp"); 97 } 98 99 102 public void testMultiboxBodyPropertyTrue() throws Exception { 103 runMyTest("testMultiboxBodyPropertyTrue", ""); 104 } 105 public void testMultiboxBodyPropertyTrueAccesskey() throws Exception { 106 runMyTest("testMultiboxBodyPropertyTrueAccesskey", ""); 107 } 108 public void testMultiboxBodyPropertyTrueAlt() throws Exception { 109 runMyTest("testMultiboxBodyPropertyTrueAlt", ""); 110 } 111 public void testMultiboxBodyPropertyTrueAltKey1() throws Exception { 112 runMyTest("testMultiboxBodyPropertyTrueAltKey1", ""); 113 } 114 public void testMultiboxBodyPropertyTrueAltKey2() throws Exception { 115 runMyTest("testMultiboxBodyPropertyTrueAltKey2", ""); 116 } 117 public void testMultiboxBodyPropertyTrueAltKey_fr1() throws Exception { 118 runMyTest("testMultiboxBodyPropertyTrueAltKey1_fr", "fr"); 119 } 120 public void testMultiboxBodyPropertyTrueAltKey_fr2() throws Exception { 121 runMyTest("testMultiboxBodyPropertyTrueAltKey2_fr", "fr"); 122 } 123 public void testMultiboxBodyPropertyTrueDisabled_True() throws Exception { 124 runMyTest("testMultiboxBodyPropertyTrueDisabled_True", ""); 125 } 126 public void testMultiboxBodyPropertyTrueDisabled_False1() throws Exception { 127 runMyTest("testMultiboxBodyPropertyTrueDisabled_False1", ""); 128 } 129 public void testMultiboxBodyPropertyTrueDisabled_False2() throws Exception { 130 runMyTest("testMultiboxBodyPropertyTrueDisabled_False2", ""); 131 } 132 public void testMultiboxBodyPropertyTrueOnblur() throws Exception { 133 runMyTest("testMultiboxBodyPropertyTrueOnblur", ""); 134 } 135 136 public void testMultiboxBodyPropertyTrueOnchange() throws Exception { 137 runMyTest("testMultiboxBodyPropertyTrueOnchange", ""); 138 } 139 140 public void testMultiboxBodyPropertyTrueOnclick() throws Exception { 141 runMyTest("testMultiboxBodyPropertyTrueOnclick", ""); 142 } 143 144 public void testMultiboxBodyPropertyTrueOndblclick() throws Exception { 145 runMyTest("testMultiboxBodyPropertyTrueOndblclick", ""); 146 } 147 148 public void testMultiboxBodyPropertyTrueOnfocus() throws Exception { 149 runMyTest("testMultiboxBodyPropertyTrueOnfocus", ""); 150 } 151 152 public void testMultiboxBodyPropertyTrueOnkeydown() throws Exception { 153 runMyTest("testMultiboxBodyPropertyTrueOnkeydown", ""); 154 } 155 156 public void testMultiboxBodyPropertyTrueOnkeypress() throws Exception { 157 runMyTest("testMultiboxBodyPropertyTrueOnkeypress", ""); 158 } 159 160 public void testMultiboxBodyPropertyTrueOnkeyup() throws Exception { 161 runMyTest("testMultiboxBodyPropertyTrueOnkeyup", ""); 162 } 163 164 public void testMultiboxBodyPropertyTrueOnmousedown() throws Exception { 165 runMyTest("testMultiboxBodyPropertyTrueOnmousedown", ""); 166 } 167 168 public void testMultiboxBodyPropertyTrueOnmousemove() throws Exception { 169 runMyTest("testMultiboxBodyPropertyTrueOnmousemove", ""); 170 } 171 172 public void testMultiboxBodyPropertyTrueOnmouseout() throws Exception { 173 runMyTest("testMultiboxBodyPropertyTrueOnmouseout", ""); 174 } 175 176 public void testMultiboxBodyPropertyTrueOnmouseover() throws Exception { 177 runMyTest("testMultiboxBodyPropertyTrueOnmouseover", ""); 178 } 179 180 public void testMultiboxBodyPropertyTrueOnmouseup() throws Exception { 181 runMyTest("testMultiboxBodyPropertyTrueOnmouseup", ""); 182 } 183 184 } 185 | Popular Tags |