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 38 public class TestMultiboxTag5 extends JspTestCase { 39 40 45 public TestMultiboxTag5(String theName) { 46 super(theName); 47 } 48 49 54 public static void main(String [] theArgs) { 55 junit.awtui.TestRunner.main(new String [] {TestMultiboxTag5.class.getName()}); 56 } 57 58 62 public static Test suite() { 63 return new TestSuite(TestMultiboxTag5.class); 65 } 66 67 private void runMyTest(String whichTest, String locale) throws Exception { 68 pageContext.setAttribute(Globals.LOCALE_KEY, 69 new Locale (locale, locale), 70 PageContext.SESSION_SCOPE); 71 72 String [] s = new String [7]; 73 for(int i = 1; i < 7; i++){ 74 s[i] = "value" + i; 75 } 76 SimpleBeanForTesting sbft = new SimpleBeanForTesting(s); 77 78 pageContext.setAttribute(Constants.BEAN_KEY, sbft, PageContext.REQUEST_SCOPE); 79 request.setAttribute("runTest", whichTest); 80 pageContext.forward("/test/org/apache/struts/taglib/html/TestMultiboxTag5.jsp"); 81 } 82 83 86 public void testMultiboxPropertyStyle() throws Exception { 87 runMyTest("testMultiboxPropertyStyle", ""); 88 } 89 public void testMultiboxPropertyErrorStyle() throws Exception { 90 runMyTest("testMultiboxPropertyErrorStyle", ""); 91 } 92 public void testMultiboxPropertyStyleClass() throws Exception { 93 runMyTest("testMultiboxPropertyStyleClass", ""); 94 } 95 public void testMultiboxPropertyErrorStyleClass() throws Exception { 96 runMyTest("testMultiboxPropertyErrorStyleClass", ""); 97 } 98 public void testMultiboxPropertyStyleId() throws Exception { 99 runMyTest("testMultiboxPropertyStyleId", ""); 100 } 101 public void testMultiboxPropertyErrorStyleId() throws Exception { 102 runMyTest("testMultiboxPropertyErrorStyleId", ""); 103 } 104 105 } 106 | Popular Tags |