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 29 34 public class TestCancelTag2 extends JspTestCase { 35 36 41 public TestCancelTag2(String theName) { 42 super(theName); 43 } 44 45 50 public static void main(String [] theArgs) { 51 junit.awtui.TestRunner.main(new String [] {TestCancelTag2.class.getName()}); 52 } 53 54 58 public static Test suite() { 59 return new TestSuite(TestCancelTag2.class); 61 } 62 63 private void runMyTest(String whichTest, String locale) throws Exception { 64 pageContext.setAttribute(Globals.LOCALE_KEY, new Locale (locale, locale), PageContext.SESSION_SCOPE); 65 request.setAttribute("runTest", whichTest); 66 pageContext.forward("/test/org/apache/struts/taglib/html/TestCancelTag2.jsp"); 67 } 68 69 72 73 public void testCancelStyle() throws Exception { 74 runMyTest("testCancelStyle", ""); 75 } 76 77 public void testCancelStyleClass() throws Exception { 78 runMyTest("testCancelStyleClass", ""); 79 } 80 81 public void testCancelStyleId() throws Exception { 82 runMyTest("testCancelStyleId", ""); 83 } 84 85 public void testCancelTabindex() throws Exception { 86 runMyTest("testCancelTabindex", ""); 87 } 88 89 public void testCancelTitle() throws Exception { 90 runMyTest("testCancelTitle", ""); 91 } 92 93 public void testCancelTitleKey() throws Exception { 94 runMyTest("testCancelTitleKey", ""); 95 } 96 97 public void testCancelTitleKey_fr() throws Exception { 98 runMyTest("testCancelTitleKey_fr", "fr"); 99 } 100 101 public void testCancelValue() throws Exception { 102 runMyTest("testCancelValue", ""); 103 } 104 105 public void testCancelBodyContent() throws Exception { 106 runMyTest("testCancelBodyContent", ""); 107 } 108 109 public void testCancelBodyContentMessageKey() throws Exception { 110 runMyTest("testCancelBodyContentMessageKey", ""); 111 } 112 113 public void testCancelBodyContentMessageKey_fr() throws Exception { 114 runMyTest("testCancelBodyContentMessageKey_fr", "fr"); 115 } 116 117 } 118 | Popular Tags |