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 TestHtmlTag extends JspTestCase { 36 37 42 public TestHtmlTag(String theName) { 43 super(theName); 44 } 45 46 51 public static void main(String [] theArgs) { 52 junit.awtui.TestRunner.main(new String [] {TestHtmlTag.class.getName()}); 53 } 54 55 59 public static Test suite() { 60 return new TestSuite(TestHtmlTag.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/TestHtmlTag.jsp"); 69 } 70 71 74 public void testHtml() throws Exception { 75 runMyTest("testHtml", ""); 76 } 77 78 public void testHtmlLocale1() throws Exception { 79 runMyTest("testHtmlLocale1", ""); 80 } 81 82 public void testHtmlLocale2() throws Exception { 83 runMyTest("testHtmlLocale2", ""); 84 } 85 86 public void testHtmlLocale3() throws Exception { 87 runMyTest("testHtmlLocale3", ""); 88 } 89 90 public void testHtmlLocale4() throws Exception { 91 runMyTest("testHtmlLocale4", ""); 92 } 93 94 public void testHtmlLocale5() throws Exception { 95 runMyTest("testHtmlLocale5", ""); 96 } 97 98 public void testHtmlLocale6() throws Exception { 99 runMyTest("testHtmlLocale6", ""); 100 } 101 102 public void testHtmlLocale_fr1() throws Exception { 103 runMyTest("testHtmlLocale_fr1", "fr"); 104 } 105 106 public void testHtmlLocale_fr2() throws Exception { 107 runMyTest("testHtmlLocale_fr2", "fr"); 108 } 109 110 public void testHtmlLocale_fr3() throws Exception { 111 runMyTest("testHtmlLocale_fr3", "fr"); 112 } 113 114 public void testHtmlLocale_fr4() throws Exception { 115 runMyTest("testHtmlLocale_fr4", "fr"); 116 } 117 118 public void testHtmlLocale_fr5() throws Exception { 119 runMyTest("testHtmlLocale_fr5", "fr"); 120 } 121 122 public void testHtmlLocale_fr6() throws Exception { 123 runMyTest("testHtmlLocale_fr6", "fr"); 124 } 125 126 public void testHtmlXhtml1() throws Exception { 127 runMyTest("testHtmlXhtml1", ""); 128 } 129 130 public void testHtmlXhtml2() throws Exception { 131 runMyTest("testHtmlXhtml2", ""); 132 } 133 134 public void testHtmlXhtml3() throws Exception { 135 runMyTest("testHtmlXhtml3", ""); 136 } 137 138 public void testHtmlXhtml4() throws Exception { 139 runMyTest("testHtmlXhtml4", ""); 140 } 141 142 public void testHtmlXhtml5() throws Exception { 143 runMyTest("testHtmlXhtml5", ""); 144 } 145 146 public void testHtmlXhtml6() throws Exception { 147 runMyTest("testHtmlXhtml6", ""); 148 } 149 150 public void testHtmlLocaleXhtml1() throws Exception { 151 runMyTest("testHtmlLocaleXhtml1", ""); 152 } 153 154 public void testHtmlLocaleXhtml2() throws Exception { 155 runMyTest("testHtmlLocaleXhtml2", ""); 156 } 157 158 public void testHtmlLocaleXhtml3() throws Exception { 159 runMyTest("testHtmlLocaleXhtml3", ""); 160 } 161 162 public void testHtmlLocaleXhtml_fr1() throws Exception { 163 runMyTest("testHtmlLocaleXhtml_fr1", "fr"); 164 } 165 166 public void testHtmlLocaleXhtml_fr2() throws Exception { 167 runMyTest("testHtmlLocaleXhtml_fr2", "fr"); 168 } 169 170 public void testHtmlLocaleXhtml_fr3() throws Exception { 171 runMyTest("testHtmlLocaleXhtml_fr3", "fr"); 172 } 173 174 175 } 176 | Popular Tags |