1 18 package org.apache.struts.taglib.html; 19 20 import java.util.Locale ; 21 22 import javax.servlet.jsp.PageContext ; 23 24 import junit.framework.Test; 25 import junit.framework.TestSuite; 26 27 import org.apache.cactus.JspTestCase; 28 import org.apache.struts.Globals; 29 import org.apache.struts.taglib.SimpleBeanForTesting; 30 31 36 public class TestImgTag1 extends JspTestCase { 37 38 43 public TestImgTag1(String theName) { 44 super(theName); 45 } 46 47 52 public static void main(String [] theArgs) { 53 junit.awtui.TestRunner.main(new String [] {TestImgTag1.class.getName()}); 54 } 55 56 60 public static Test suite() { 61 return new TestSuite(TestImgTag1.class); 63 } 64 65 private void runMyTest(String whichTest, String locale) throws Exception { 66 pageContext.setAttribute(Globals.LOCALE_KEY, new Locale (locale, locale), PageContext.SESSION_SCOPE); 67 pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE); 68 request.setAttribute("runTest", whichTest); 69 pageContext.forward("/test/org/apache/struts/taglib/html/TestImgTag1.jsp"); 70 } 71 72 75 76 78 public void testImgPageAlign1() throws Exception { 79 runMyTest("testImgPageAlign1", ""); 80 } 81 82 public void testImgPageAlign2() throws Exception { 83 runMyTest("testImgPageAlign2", ""); 84 } 85 86 public void testImgPageAlign3() throws Exception { 87 runMyTest("testImgPageAlign3", ""); 88 } 89 90 public void testImgPageAlign4() throws Exception { 91 runMyTest("testImgPageAlign4", ""); 92 } 93 94 public void testImgPageAlign5() throws Exception { 95 runMyTest("testImgPageAlign5", ""); 96 } 97 98 public void testImgPageAlign6() throws Exception { 99 runMyTest("testImgPageAlign6", ""); 100 } 101 102 public void testImgPageAlign7() throws Exception { 103 runMyTest("testImgPageAlign7", ""); 104 } 105 106 public void testImgPageAlign8() throws Exception { 107 runMyTest("testImgPageAlign8", ""); 108 } 109 110 public void testImgPageAlign9() throws Exception { 111 runMyTest("testImgPageAlign9", ""); 112 } 113 114 public void testImgPageAlign10() throws Exception { 115 runMyTest("testImgPageAlign10", ""); 116 } 117 118 public void testImgPageAlt() throws Exception { 119 runMyTest("testImgPageAlt", ""); 120 } 121 122 public void testImgPageAltKeyDefaultBundle() throws Exception { 123 runMyTest("testImgPageAltKeyDefaultBundle", ""); 124 } 125 126 public void testImgPageAltKeyAlternateBundle() throws Exception { 127 runMyTest("testImgPageAltKeyAlternateBundle", ""); 128 } 129 130 public void testImgPageAltKeyDefaultBundle_fr() throws Exception { 131 runMyTest("testImgPageAltKeyDefaultBundle_fr", "fr"); 132 } 133 134 public void testImgPageAltKeyAlternateBundle_fr() throws Exception { 135 runMyTest("testImgPageAltKeyAlternateBundle_fr", "fr"); 136 } 137 138 public void testImgPageBorder() throws Exception { 139 runMyTest("testImgPageBorder", ""); 140 } 141 142 public void testImgPageHeight1() throws Exception { 143 runMyTest("testImgPageHeight1", ""); 144 } 145 146 public void testImgPageHeight2() throws Exception { 147 runMyTest("testImgPageHeight2", ""); 148 } 149 150 public void testImgPageHspace() throws Exception { 151 runMyTest("testImgPageHspace", ""); 152 } 153 154 public void testImgPageImageName() throws Exception { 155 runMyTest("testImgPageImageName", ""); 156 } 157 158 public void testImgPageImageIsmap() throws Exception { 159 runMyTest("testImgPageImageIsmap", ""); 160 } 161 162 public void testImgPageLocale() throws Exception { 163 pageContext.setAttribute("secret locale", new Locale ("fr", "fr"), PageContext.SESSION_SCOPE); 164 runMyTest("testImgPageLocale", ""); 165 } 166 167 } 168 | Popular Tags |