You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 22:05:22 UTC

svn commit: r376846 [9/14] - in /struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib: ./ bean/ bean/resources/ html/ logic/

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag1.java Fri Feb 10 13:05:03 2006
@@ -17,24 +17,21 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.StringTokenizer;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.LinkTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.LinkTag</code>
+ * class.
  */
 public class TestLinkTag1 extends JspTestCase {
 
@@ -53,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag1.class.getName() });
     }
 
     /**
@@ -66,9 +64,12 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag1.jsp");
     }
 
     /*
@@ -94,7 +95,7 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedArray", "");
-        }
+    }
 
     public void testLinkForwardIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -103,14 +104,14 @@
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedArrayProperty", "");
-        }
+    }
 
     public void testLinkForwardIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedMap", "");
-        }
+    }
 
     public void testLinkForwardIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -119,13 +120,13 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedMapProperty", "");
-        }
+    }
 
     public void testLinkForwardIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedEnumeration", "");
-        }
+    }
 
     public void testLinkForwardIndexedEnumerationProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -133,7 +134,7 @@
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedEnumerationProperty", "");
-        }
+    }
 
 
     public void testLinkForwardIndexedAlternateIdArray() throws Exception {
@@ -141,133 +142,147 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdArray", "");
-        }
+    }
 
-    public void testLinkForwardIndexedAlternateIdArrayProperty() throws Exception {
+    public void testLinkForwardIndexedAlternateIdArrayProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdArrayProperty", "");
-        }
+    }
 
     public void testLinkForwardIndexedAlternateIdMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdMap", "");
-        }
+    }
 
-    public void testLinkForwardIndexedAlternateIdMapProperty() throws Exception {
+    public void testLinkForwardIndexedAlternateIdMapProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdMapProperty", "");
-        }
+    }
 
-    public void testLinkForwardIndexedAlternateIdEnumeration() throws Exception {
+    public void testLinkForwardIndexedAlternateIdEnumeration()
+            throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdEnumeration", "");
-        }
+    }
 
-    public void testLinkForwardIndexedAlternateIdEnumerationProperty() throws Exception {
+    public void testLinkForwardIndexedAlternateIdEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardIndexedAlternateIdEnumerationProperty", "");
-        }
+    }
 
     public void testLinkForwardLinkName() throws Exception {
-       runMyTest("testLinkForwardLinkName", "");
+        runMyTest("testLinkForwardLinkName", "");
     }
 
     public void testLinkForwardNameNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkForwardNameNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkForwardNameNoScope", "");
     }
 
     public void testLinkForwardNamePropertyNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkForwardNamePropertyNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkForwardNamePropertyNoScope", "");
     }
 
     public void testLinkForwardNameApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkForwardNameApplicationScope", "");
-    }
-
-    public void testLinkForwardNamePropertyApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkForwardNamePropertyApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext
+                .setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkForwardNameApplicationScope", "");
+    }
+
+    public void testLinkForwardNamePropertyApplicationScope()
+            throws Exception {
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkForwardNamePropertyApplicationScope", "");
     }
 
     public void testLinkForwardNameSessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkForwardNameSessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
+        runMyTest("testLinkForwardNameSessionScope", "");
     }
 
     public void testLinkForwardNamePropertySessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkForwardNamePropertySessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkForwardNamePropertySessionScope", "");
     }
 
     public void testLinkForwardNameRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkForwardNameRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkForwardNameRequestScope", "");
     }
 
     public void testLinkForwardNamePropertyRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkForwardNamePropertyRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkForwardNamePropertyRequestScope", "");
     }
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag2.java Fri Feb 10 13:05:03 2006
@@ -17,21 +17,18 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.FrameTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.FrameTag</code>
+ * class.
  */
 public class TestLinkTag2 extends JspTestCase {
 
@@ -50,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag2.class.getName() });
     }
 
     /**
@@ -63,10 +61,15 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
-        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Constants.BEAN_KEY,
+                new SimpleBeanForTesting("Test Value"),
+                PageContext.REQUEST_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag2.jsp");
     }
 
     /*
@@ -74,6 +77,7 @@
      */
 
 //--------Testing attributes using forward------
+
     public void testLinkForwardOnblur() throws Exception {
         runMyTest("testLinkForwardOnblur", "");
     }
@@ -123,47 +127,78 @@
     }
 
     public void testLinkForwardParamIdParamNameNoScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardParamIdParamNameNoScope", "");
     }
 
-    public void testLinkForwardParamIdParamNameParamPropertyNoScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
+    public void testLinkForwardParamIdParamNameParamPropertyNoScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardParamIdParamNameParamPropertyNoScope", "");
     }
 
-    public void testLinkForwardParamIdParamNameApplicationScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.APPLICATION_SCOPE);
+    public void testLinkForwardParamIdParamNameApplicationScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.APPLICATION_SCOPE);
         runMyTest("testLinkForwardParamIdParamNameApplicationScope", "");
     }
 
-    public void testLinkForwardParamIdParamNameParamPropertyApplicationScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.APPLICATION_SCOPE);
-        runMyTest("testLinkForwardParamIdParamNameParamPropertyApplicationScope", "");
-    }
-
-    public void testLinkForwardParamIdParamNameSessionScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.SESSION_SCOPE);
+    public void testLinkForwardParamIdParamNameParamPropertyApplicationScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testLinkForwardParamIdParamNameParamPropertyApplicationScope",
+                "");
+    }
+
+    public void testLinkForwardParamIdParamNameSessionScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkForwardParamIdParamNameSessionScope", "");
     }
 
-    public void testLinkForwardParamIdParamNameParamPropertySessionScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.SESSION_SCOPE);
-        runMyTest("testLinkForwardParamIdParamNameParamPropertySessionScope", "");
-    }
-
-    public void testLinkForwardParamIdParamNameRequestScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+    public void testLinkForwardParamIdParamNameParamPropertySessionScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkForwardParamIdParamNameParamPropertySessionScope",
+                "");
+    }
+
+    public void testLinkForwardParamIdParamNameRequestScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkForwardParamIdParamNameRequestScope", "");
     }
 
-    public void testLinkForwardParamIdParamNameParamPropertyRequestScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
-        runMyTest("testLinkForwardParamIdParamNameParamPropertyRequestScope", "");
+    public void testLinkForwardParamIdParamNameParamPropertyRequestScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkForwardParamIdParamNameParamPropertyRequestScope",
+                "");
     }
 
 
@@ -188,11 +223,6 @@
     }
 
 
-
-
-
-
-
     public void testLinkForwardTitle() throws Exception {
         runMyTest("testLinkForwardTitle", "");
     }
@@ -200,17 +230,17 @@
     public void testLinkForwardTitleKey() throws Exception {
         runMyTest("testLinkForwardTitleKey", "");
     }
+
     public void testLinkForwardTitleKeyAlt() throws Exception {
         runMyTest("testLinkForwardTitleKeyAlt", "");
     }
 
     public void testLinkForwardTransaction() throws Exception {
-        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY, "Some_Token_Here", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY,
+                "Some_Token_Here",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkForwardTransaction", "");
     }
-
-
-
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag3.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag3.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag3.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag3.java Fri Feb 10 13:05:03 2006
@@ -17,24 +17,21 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.StringTokenizer;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.LinkTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.LinkTag</code>
+ * class.
  */
 public class TestLinkTag3 extends JspTestCase {
 
@@ -53,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag3.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag3.class.getName() });
     }
 
     /**
@@ -66,9 +64,12 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag3.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag3.jsp");
     }
 
     /*
@@ -94,7 +95,7 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedArray", "");
-        }
+    }
 
     public void testLinkActionIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -103,14 +104,14 @@
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedArrayProperty", "");
-        }
+    }
 
     public void testLinkActionIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedMap", "");
-        }
+    }
 
     public void testLinkActionIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -119,13 +120,13 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedMapProperty", "");
-        }
+    }
 
     public void testLinkActionIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedEnumeration", "");
-        }
+    }
 
     public void testLinkActionIndexedEnumerationProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -133,7 +134,7 @@
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedEnumerationProperty", "");
-        }
+    }
 
 
     public void testLinkActionIndexedAlternateIdArray() throws Exception {
@@ -141,133 +142,147 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdArray", "");
-        }
+    }
 
-    public void testLinkActionIndexedAlternateIdArrayProperty() throws Exception {
+    public void testLinkActionIndexedAlternateIdArrayProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdArrayProperty", "");
-        }
+    }
 
     public void testLinkActionIndexedAlternateIdMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdMap", "");
-        }
+    }
 
-    public void testLinkActionIndexedAlternateIdMapProperty() throws Exception {
+    public void testLinkActionIndexedAlternateIdMapProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdMapProperty", "");
-        }
+    }
 
-    public void testLinkActionIndexedAlternateIdEnumeration() throws Exception {
+    public void testLinkActionIndexedAlternateIdEnumeration()
+            throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdEnumeration", "");
-        }
+    }
 
-    public void testLinkActionIndexedAlternateIdEnumerationProperty() throws Exception {
+    public void testLinkActionIndexedAlternateIdEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionIndexedAlternateIdEnumerationProperty", "");
-        }
+    }
 
     public void testLinkActionLinkName() throws Exception {
-       runMyTest("testLinkActionLinkName", "");
+        runMyTest("testLinkActionLinkName", "");
     }
 
     public void testLinkActionNameNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkActionNameNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkActionNameNoScope", "");
     }
 
     public void testLinkActionNamePropertyNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkActionNamePropertyNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkActionNamePropertyNoScope", "");
     }
 
     public void testLinkActionNameApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkActionNameApplicationScope", "");
-    }
-
-    public void testLinkActionNamePropertyApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkActionNamePropertyApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext
+                .setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkActionNameApplicationScope", "");
+    }
+
+    public void testLinkActionNamePropertyApplicationScope()
+            throws Exception {
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkActionNamePropertyApplicationScope", "");
     }
 
     public void testLinkActionNameSessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkActionNameSessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
+        runMyTest("testLinkActionNameSessionScope", "");
     }
 
     public void testLinkActionNamePropertySessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkActionNamePropertySessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkActionNamePropertySessionScope", "");
     }
 
     public void testLinkActionNameRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkActionNameRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkActionNameRequestScope", "");
     }
 
     public void testLinkActionNamePropertyRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkActionNamePropertyRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkActionNamePropertyRequestScope", "");
     }
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag4.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag4.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag4.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag4.java Fri Feb 10 13:05:03 2006
@@ -17,21 +17,18 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.FrameTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.FrameTag</code>
+ * class.
  */
 public class TestLinkTag4 extends JspTestCase {
 
@@ -50,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag4.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag4.class.getName() });
     }
 
     /**
@@ -63,10 +61,15 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
-        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Constants.BEAN_KEY,
+                new SimpleBeanForTesting("Test Value"),
+                PageContext.REQUEST_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag4.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag4.jsp");
     }
 
     /*
@@ -74,6 +77,7 @@
      */
 
 //--------Testing attributes using forward------
+
     public void testLinkActionOnblur() throws Exception {
         runMyTest("testLinkActionOnblur", "");
     }
@@ -123,47 +127,78 @@
     }
 
     public void testLinkActionParamIdParamNameNoScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionParamIdParamNameNoScope", "");
     }
 
-    public void testLinkActionParamIdParamNameParamPropertyNoScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
+    public void testLinkActionParamIdParamNameParamPropertyNoScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionParamIdParamNameParamPropertyNoScope", "");
     }
 
-    public void testLinkActionParamIdParamNameApplicationScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.APPLICATION_SCOPE);
+    public void testLinkActionParamIdParamNameApplicationScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.APPLICATION_SCOPE);
         runMyTest("testLinkActionParamIdParamNameApplicationScope", "");
     }
 
-    public void testLinkActionParamIdParamNameParamPropertyApplicationScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.APPLICATION_SCOPE);
-        runMyTest("testLinkActionParamIdParamNameParamPropertyApplicationScope", "");
-    }
-
-    public void testLinkActionParamIdParamNameSessionScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.SESSION_SCOPE);
+    public void testLinkActionParamIdParamNameParamPropertyApplicationScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testLinkActionParamIdParamNameParamPropertyApplicationScope",
+                "");
+    }
+
+    public void testLinkActionParamIdParamNameSessionScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkActionParamIdParamNameSessionScope", "");
     }
 
-    public void testLinkActionParamIdParamNameParamPropertySessionScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.SESSION_SCOPE);
-        runMyTest("testLinkActionParamIdParamNameParamPropertySessionScope", "");
-    }
-
-    public void testLinkActionParamIdParamNameRequestScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+    public void testLinkActionParamIdParamNameParamPropertySessionScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkActionParamIdParamNameParamPropertySessionScope",
+                "");
+    }
+
+    public void testLinkActionParamIdParamNameRequestScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkActionParamIdParamNameRequestScope", "");
     }
 
-    public void testLinkActionParamIdParamNameParamPropertyRequestScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
-        runMyTest("testLinkActionParamIdParamNameParamPropertyRequestScope", "");
+    public void testLinkActionParamIdParamNameParamPropertyRequestScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkActionParamIdParamNameParamPropertyRequestScope",
+                "");
     }
 
 
@@ -188,11 +223,6 @@
     }
 
 
-
-
-
-
-
     public void testLinkActionTitle() throws Exception {
         runMyTest("testLinkActionTitle", "");
     }
@@ -202,12 +232,11 @@
     }
 
     public void testLinkActionTransaction() throws Exception {
-        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY, "Some_Token_Here", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY,
+                "Some_Token_Here",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkActionTransaction", "");
     }
-
-
-
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag5.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag5.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag5.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag5.java Fri Feb 10 13:05:03 2006
@@ -17,24 +17,21 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.StringTokenizer;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.LinkTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.LinkTag</code>
+ * class.
  */
 public class TestLinkTag5 extends JspTestCase {
 
@@ -53,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag5.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag5.class.getName() });
     }
 
     /**
@@ -66,9 +64,12 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag5.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag5.jsp");
     }
 
     /*
@@ -94,7 +95,7 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedArray", "");
-        }
+    }
 
     public void testLinkHrefIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -103,14 +104,14 @@
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedArrayProperty", "");
-        }
+    }
 
     public void testLinkHrefIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedMap", "");
-        }
+    }
 
     public void testLinkHrefIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -119,13 +120,13 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedMapProperty", "");
-        }
+    }
 
     public void testLinkHrefIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedEnumeration", "");
-        }
+    }
 
     public void testLinkHrefIndexedEnumerationProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -133,7 +134,7 @@
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedEnumerationProperty", "");
-        }
+    }
 
 
     public void testLinkHrefIndexedAlternateIdArray() throws Exception {
@@ -141,23 +142,24 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdArray", "");
-        }
+    }
 
-    public void testLinkHrefIndexedAlternateIdArrayProperty() throws Exception {
+    public void testLinkHrefIndexedAlternateIdArrayProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdArrayProperty", "");
-        }
+    }
 
     public void testLinkHrefIndexedAlternateIdMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdMap", "");
-        }
+    }
 
     public void testLinkHrefIndexedAlternateIdMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -166,108 +168,118 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdMapProperty", "");
-        }
+    }
 
     public void testLinkHrefIndexedAlternateIdEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdEnumeration", "");
-        }
+    }
 
-    public void testLinkHrefIndexedAlternateIdEnumerationProperty() throws Exception {
+    public void testLinkHrefIndexedAlternateIdEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefIndexedAlternateIdEnumerationProperty", "");
-        }
+    }
 
     public void testLinkHrefLinkName() throws Exception {
-       runMyTest("testLinkHrefLinkName", "");
+        runMyTest("testLinkHrefLinkName", "");
     }
 
     public void testLinkHrefNameNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkHrefNameNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkHrefNameNoScope", "");
     }
 
     public void testLinkHrefNamePropertyNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkHrefNamePropertyNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkHrefNamePropertyNoScope", "");
     }
 
     public void testLinkHrefNameApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkHrefNameApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext
+                .setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkHrefNameApplicationScope", "");
     }
 
     public void testLinkHrefNamePropertyApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkHrefNamePropertyApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkHrefNamePropertyApplicationScope", "");
     }
 
     public void testLinkHrefNameSessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkHrefNameSessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
+        runMyTest("testLinkHrefNameSessionScope", "");
     }
 
     public void testLinkHrefNamePropertySessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkHrefNamePropertySessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkHrefNamePropertySessionScope", "");
     }
 
     public void testLinkHrefNameRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkHrefNameRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkHrefNameRequestScope", "");
     }
 
     public void testLinkHrefNamePropertyRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkHrefNamePropertyRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkHrefNamePropertyRequestScope", "");
     }
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag6.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag6.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag6.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag6.java Fri Feb 10 13:05:03 2006
@@ -17,21 +17,18 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.FrameTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.FrameTag</code>
+ * class.
  */
 public class TestLinkTag6 extends JspTestCase {
 
@@ -50,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag6.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag6.class.getName() });
     }
 
     /**
@@ -63,10 +61,15 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
-        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Constants.BEAN_KEY,
+                new SimpleBeanForTesting("Test Value"),
+                PageContext.REQUEST_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag6.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag6.jsp");
     }
 
     /*
@@ -74,6 +77,7 @@
      */
 
 //--------Testing attributes using forward------
+
     public void testLinkHrefOnblur() throws Exception {
         runMyTest("testLinkHrefOnblur", "");
     }
@@ -123,47 +127,75 @@
     }
 
     public void testLinkHrefParamIdParamNameNoScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefParamIdParamNameNoScope", "");
     }
 
-    public void testLinkHrefParamIdParamNameParamPropertyNoScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
+    public void testLinkHrefParamIdParamNameParamPropertyNoScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefParamIdParamNameParamPropertyNoScope", "");
     }
 
-    public void testLinkHrefParamIdParamNameApplicationScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.APPLICATION_SCOPE);
+    public void testLinkHrefParamIdParamNameApplicationScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.APPLICATION_SCOPE);
         runMyTest("testLinkHrefParamIdParamNameApplicationScope", "");
     }
 
-    public void testLinkHrefParamIdParamNameParamPropertyApplicationScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.APPLICATION_SCOPE);
-        runMyTest("testLinkHrefParamIdParamNameParamPropertyApplicationScope", "");
+    public void testLinkHrefParamIdParamNameParamPropertyApplicationScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkHrefParamIdParamNameParamPropertyApplicationScope",
+                "");
     }
 
     public void testLinkHrefParamIdParamNameSessionScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkHrefParamIdParamNameSessionScope", "");
     }
 
-    public void testLinkHrefParamIdParamNameParamPropertySessionScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.SESSION_SCOPE);
-        runMyTest("testLinkHrefParamIdParamNameParamPropertySessionScope", "");
+    public void testLinkHrefParamIdParamNameParamPropertySessionScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkHrefParamIdParamNameParamPropertySessionScope",
+                "");
     }
 
     public void testLinkHrefParamIdParamNameRequestScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkHrefParamIdParamNameRequestScope", "");
     }
 
-    public void testLinkHrefParamIdParamNameParamPropertyRequestScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
-        runMyTest("testLinkHrefParamIdParamNameParamPropertyRequestScope", "");
+    public void testLinkHrefParamIdParamNameParamPropertyRequestScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkHrefParamIdParamNameParamPropertyRequestScope",
+                "");
     }
 
 
@@ -188,11 +220,6 @@
     }
 
 
-
-
-
-
-
     public void testLinkHrefTitle() throws Exception {
         runMyTest("testLinkHrefTitle", "");
     }
@@ -202,12 +229,11 @@
     }
 
     public void testLinkHrefTransaction() throws Exception {
-        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY, "Some_Token_Here", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY,
+                "Some_Token_Here",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkHrefTransaction", "");
     }
-
-
-
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag7.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag7.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag7.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag7.java Fri Feb 10 13:05:03 2006
@@ -17,24 +17,21 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.StringTokenizer;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.LinkTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.LinkTag</code>
+ * class.
  */
 public class TestLinkTag7 extends JspTestCase {
 
@@ -53,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag7.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag7.class.getName() });
     }
 
     /**
@@ -66,9 +64,12 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag7.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag7.jsp");
     }
 
     /*
@@ -94,7 +95,7 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedArray", "");
-        }
+    }
 
     public void testLinkPageIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -103,14 +104,14 @@
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedArrayProperty", "");
-        }
+    }
 
     public void testLinkPageIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedMap", "");
-        }
+    }
 
     public void testLinkPageIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -119,13 +120,13 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedMapProperty", "");
-        }
+    }
 
     public void testLinkPageIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedEnumeration", "");
-        }
+    }
 
     public void testLinkPageIndexedEnumerationProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -133,7 +134,7 @@
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedEnumerationProperty", "");
-        }
+    }
 
 
     public void testLinkPageIndexedAlternateIdArray() throws Exception {
@@ -141,23 +142,24 @@
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdArray", "");
-        }
+    }
 
-    public void testLinkPageIndexedAlternateIdArrayProperty() throws Exception {
+    public void testLinkPageIndexedAlternateIdArrayProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         sbft.setList(lst);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdArrayProperty", "");
-        }
+    }
 
     public void testLinkPageIndexedAlternateIdMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdMap", "");
-        }
+    }
 
     public void testLinkPageIndexedAlternateIdMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
@@ -166,108 +168,118 @@
         sbft.setMap(map);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdMapProperty", "");
-        }
+    }
 
     public void testLinkPageIndexedAlternateIdEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdEnumeration", "");
-        }
+    }
 
-    public void testLinkPageIndexedAlternateIdEnumerationProperty() throws Exception {
+    public void testLinkPageIndexedAlternateIdEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageIndexedAlternateIdEnumerationProperty", "");
-        }
+    }
 
     public void testLinkPageLinkName() throws Exception {
-       runMyTest("testLinkPageLinkName", "");
+        runMyTest("testLinkPageLinkName", "");
     }
 
     public void testLinkPageNameNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkPageNameNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkPageNameNoScope", "");
     }
 
     public void testLinkPageNamePropertyNoScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkPageNamePropertyNoScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkPageNamePropertyNoScope", "");
     }
 
     public void testLinkPageNameApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkPageNameApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext
+                .setAttribute("paramMap", map, PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkPageNameApplicationScope", "");
     }
 
     public void testLinkPageNamePropertyApplicationScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.APPLICATION_SCOPE);
-       runMyTest("testLinkPageNamePropertyApplicationScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkPageNamePropertyApplicationScope", "");
     }
 
     public void testLinkPageNameSessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkPageNameSessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.SESSION_SCOPE);
+        runMyTest("testLinkPageNameSessionScope", "");
     }
 
     public void testLinkPageNamePropertySessionScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.SESSION_SCOPE);
-       runMyTest("testLinkPageNamePropertySessionScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkPageNamePropertySessionScope", "");
     }
 
     public void testLinkPageNameRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkPageNameRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        pageContext.setAttribute("paramMap", map, PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkPageNameRequestScope", "");
     }
 
     public void testLinkPageNamePropertyRequestScope() throws Exception {
-                HashMap map = new HashMap();
-                map.put("param1","value1");
-                map.put("param2","value2");
-                map.put("param3","value3");
-                map.put("param4","value4");
-                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
-                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
-       runMyTest("testLinkPageNamePropertyRequestScope", "");
+        HashMap map = new HashMap();
+        map.put("param1", "value1");
+        map.put("param2", "value2");
+        map.put("param3", "value3");
+        map.put("param4", "value4");
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
+        pageContext.setAttribute("paramPropertyMap",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkPageNamePropertyRequestScope", "");
     }
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag8.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag8.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag8.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag8.java Fri Feb 10 13:05:03 2006
@@ -17,21 +17,18 @@
  */
 package org.apache.struts.taglib.html;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.bean.FrameTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.bean.FrameTag</code>
+ * class.
  */
 public class TestLinkTag8 extends JspTestCase {
 
@@ -50,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestLinkTag8.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestLinkTag8.class.getName() });
     }
 
     /**
@@ -63,10 +61,15 @@
     }
 
     private void runMyTest(String whichTest, String locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
-        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                new Locale(locale, locale),
+                PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Constants.BEAN_KEY,
+                new SimpleBeanForTesting("Test Value"),
+                PageContext.REQUEST_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/html/TestLinkTag8.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestLinkTag8.jsp");
     }
 
     /*
@@ -74,6 +77,7 @@
      */
 
 //--------Testing attributes using forward------
+
     public void testLinkPageOnblur() throws Exception {
         runMyTest("testLinkPageOnblur", "");
     }
@@ -123,47 +127,75 @@
     }
 
     public void testLinkPageParamIdParamNameNoScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageParamIdParamNameNoScope", "");
     }
 
-    public void testLinkPageParamIdParamNameParamPropertyNoScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
+    public void testLinkPageParamIdParamNameParamPropertyNoScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageParamIdParamNameParamPropertyNoScope", "");
     }
 
-    public void testLinkPageParamIdParamNameApplicationScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.APPLICATION_SCOPE);
+    public void testLinkPageParamIdParamNameApplicationScope()
+            throws Exception {
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.APPLICATION_SCOPE);
         runMyTest("testLinkPageParamIdParamNameApplicationScope", "");
     }
 
-    public void testLinkPageParamIdParamNameParamPropertyApplicationScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.APPLICATION_SCOPE);
-        runMyTest("testLinkPageParamIdParamNameParamPropertyApplicationScope", "");
+    public void testLinkPageParamIdParamNameParamPropertyApplicationScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.APPLICATION_SCOPE);
+        runMyTest("testLinkPageParamIdParamNameParamPropertyApplicationScope",
+                "");
     }
 
     public void testLinkPageParamIdParamNameSessionScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkPageParamIdParamNameSessionScope", "");
     }
 
-    public void testLinkPageParamIdParamNameParamPropertySessionScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.SESSION_SCOPE);
-        runMyTest("testLinkPageParamIdParamNameParamPropertySessionScope", "");
+    public void testLinkPageParamIdParamNameParamPropertySessionScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.SESSION_SCOPE);
+        runMyTest("testLinkPageParamIdParamNameParamPropertySessionScope",
+                "");
     }
 
     public void testLinkPageParamIdParamNameRequestScope() throws Exception {
-                pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE);
+        pageContext.setAttribute("paramName",
+                "paramValue",
+                PageContext.REQUEST_SCOPE);
         runMyTest("testLinkPageParamIdParamNameRequestScope", "");
     }
 
-    public void testLinkPageParamIdParamNameParamPropertyRequestScope() throws Exception {
-        SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue");
-                pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE);
-        runMyTest("testLinkPageParamIdParamNameParamPropertyRequestScope", "");
+    public void testLinkPageParamIdParamNameParamPropertyRequestScope()
+            throws Exception {
+        SimpleBeanForTesting sbft =
+                new SimpleBeanForTesting("paramPropertyValue");
+        pageContext.setAttribute("testingParamProperty",
+                sbft,
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testLinkPageParamIdParamNameParamPropertyRequestScope",
+                "");
     }
 
 
@@ -188,11 +220,6 @@
     }
 
 
-
-
-
-
-
     public void testLinkPageTitle() throws Exception {
         runMyTest("testLinkPageTitle", "");
     }
@@ -202,12 +229,11 @@
     }
 
     public void testLinkPageTransaction() throws Exception {
-        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY, "Some_Token_Here", PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY,
+                "Some_Token_Here",
+                PageContext.SESSION_SCOPE);
         runMyTest("testLinkPageTransaction", "");
     }
-
-
-
 
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org