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 [12/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/TestSelectTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag1.java Fri Feb 10 13:05:03 2006
@@ -17,20 +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.SelectTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.SelectTag</code>
+ * class.
  */
 public class TestSelectTag1 extends JspTestCase {
 
@@ -49,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestSelectTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestSelectTag1.class.getName() });
     }
 
     /**
@@ -62,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/TestSelectTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestSelectTag1.jsp");
     }
 
     /*
@@ -74,63 +78,83 @@
     public void testSelectPropertyAlt() throws Exception {
         runMyTest("testSelectPropertyAlt", "");
     }
+
     public void testSelectPropertyAltKey1() throws Exception {
         runMyTest("testSelectPropertyAltKey1", "");
     }
+
     public void testSelectPropertyAltKey2() throws Exception {
         runMyTest("testSelectPropertyAltKey2", "");
     }
+
     public void testSelectPropertyAltKey3() throws Exception {
         runMyTest("testSelectPropertyAltKey3", "");
     }
+
     public void testSelectPropertyAltKey_fr1() throws Exception {
         runMyTest("testSelectPropertyAltKey1_fr", "fr");
     }
+
     public void testSelectPropertyAltKey_fr2() throws Exception {
         runMyTest("testSelectPropertyAltKey2_fr", "fr");
     }
+
     public void testSelectPropertyDisabled() throws Exception {
         runMyTest("testSelectPropertyDisabled", "");
     }
+
     public void testSelectPropertyMultiple() throws Exception {
         runMyTest("testSelectPropertyMultiple", "");
     }
+
     public void testSelectPropertyOnblur() throws Exception {
         runMyTest("testSelectPropertyOnblur", "");
     }
+
     public void testSelectPropertyOnchange() throws Exception {
         runMyTest("testSelectPropertyOnchange", "");
     }
+
     public void testSelectPropertyOnclick() throws Exception {
         runMyTest("testSelectPropertyOnclick", "");
     }
+
     public void testSelectPropertyOndblclick() throws Exception {
         runMyTest("testSelectPropertyOndblclick", "");
     }
+
     public void testSelectPropertyOnfocus() throws Exception {
         runMyTest("testSelectPropertyOnfocus", "");
     }
+
     public void testSelectPropertyOnkeydown() throws Exception {
         runMyTest("testSelectPropertyOnkeydown", "");
     }
+
     public void testSelectPropertyOnkeypress() throws Exception {
         runMyTest("testSelectPropertyOnkeypress", "");
     }
+
     public void testSelectPropertyOnkeyup() throws Exception {
         runMyTest("testSelectPropertyOnkeyup", "");
     }
+
     public void testSelectPropertyOnmousedown() throws Exception {
         runMyTest("testSelectPropertyOnmousedown", "");
     }
+
     public void testSelectPropertyOnmousemove() throws Exception {
         runMyTest("testSelectPropertyOnmousemove", "");
     }
+
     public void testSelectPropertyOnmouseout() throws Exception {
         runMyTest("testSelectPropertyOnmouseout", "");
     }
+
     public void testSelectPropertyOnmouseover() throws Exception {
         runMyTest("testSelectPropertyOnmouseover", "");
     }
+
     public void testSelectPropertyOnmouseup() throws Exception {
         runMyTest("testSelectPropertyOnmouseup", "");
     }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag2.java Fri Feb 10 13:05:03 2006
@@ -17,23 +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.SelectTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.SelectTag</code>
+ * class.
  */
 public class TestSelectTag2 extends JspTestCase {
 
@@ -52,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestSelectTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestSelectTag2.class.getName() });
     }
 
     /**
@@ -65,10 +64,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/TestSelectTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestSelectTag2.jsp");
     }
 
     /*
@@ -78,45 +82,58 @@
     public void testSelectPropertyStyle() throws Exception {
         runMyTest("testSelectPropertyStyle", "");
     }
+
     public void testSelectPropertyErrorStyle() throws Exception {
         runMyTest("testSelectPropertyErrorStyle", "");
     }
+
     public void testSelectPropertyStyleClass() throws Exception {
         runMyTest("testSelectPropertyStyleClass", "");
     }
+
     public void testSelectPropertyErrorStyleClass() throws Exception {
         runMyTest("testSelectPropertyErrorStyleClass", "");
     }
+
     public void testSelectPropertyStyleId() throws Exception {
         runMyTest("testSelectPropertyStyleId", "");
     }
+
     public void testSelectPropertyErrorStyleId() throws Exception {
         runMyTest("testSelectPropertyErrorStyleId", "");
     }
+
     public void testSelectPropertyTitle() throws Exception {
         runMyTest("testSelectPropertyTitle", "");
     }
+
     public void testSelectPropertyTitleKey() throws Exception {
         runMyTest("testSelectPropertyTitleKey", "");
     }
+
     public void testSelectPropertyTitleKey_fr() throws Exception {
         runMyTest("testSelectPropertyTitleKey_fr", "fr");
     }
+
     public void testSelectTabindex() throws Exception {
         runMyTest("testSelectTabindex", "");
     }
+
     public void testSelectSize() throws Exception {
         runMyTest("testSelectSize", "");
     }
+
     public void testSelectPropertyValue() throws Exception {
         runMyTest("testSelectPropertyValue", "");
     }
+
     public void testSelectPropertyIndexedArray() throws Exception {
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testSelectPropertyIndexedArray", "");
     }
+
     public void testSelectPropertyIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
@@ -125,12 +142,14 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testSelectPropertyIndexedArrayProperty", "");
     }
+
     public void testSelectPropertyIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testSelectPropertyIndexedMap", "");
     }
+
     public void testSelectPropertyIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
@@ -139,12 +158,15 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testSelectPropertyIndexedMapProperty", "");
     }
+
     public void testSelectPropertyIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testSelectPropertyIndexedEnumeration", "");
     }
-    public void testSelectPropertyIndexedEnumerationProperty() throws Exception {
+
+    public void testSelectPropertyIndexedEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag1.java Fri Feb 10 13:05:03 2006
@@ -17,19 +17,17 @@
  */
 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 javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.html.SubmitTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.SubmitTag</code>
+ * class.
  */
 public class TestSubmitTag1 extends JspTestCase {
 
@@ -48,7 +46,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestSubmitTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestSubmitTag1.class.getName() });
     }
 
     /**
@@ -61,9 +60,13 @@
     }
 
     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/TestSubmitTag1.jsp");    }
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestSubmitTag1.jsp");
+    }
 
     /*
      * Testing SubmitTag.
@@ -71,72 +74,95 @@
     public void testSubmitProperty() throws Exception {
         runMyTest("testSubmitProperty", "");
     }
+
     public void testSubmitPropertyAccesskey() throws Exception {
         runMyTest("testSubmitPropertyAccesskey", "");
     }
+
     public void testSubmitPropertyAlt() throws Exception {
         runMyTest("testSubmitPropertyAlt", "");
     }
+
     public void testSubmitPropertyAltKey1() throws Exception {
         runMyTest("testSubmitPropertyAltKey1", "");
     }
+
     public void testSubmitPropertyAltKey2() throws Exception {
         runMyTest("testSubmitPropertyAltKey2", "");
     }
+
     public void testSubmitPropertyAltKey3() throws Exception {
         runMyTest("testSubmitPropertyAltKey3", "");
     }
+
     public void testSubmitPropertyAltKey_fr1() throws Exception {
         runMyTest("testSubmitPropertyAltKey1_fr", "fr");
     }
+
     public void testSubmitPropertyAltKey_fr2() throws Exception {
         runMyTest("testSubmitPropertyAltKey2_fr", "fr");
     }
+
     public void testSubmitPropertyDisabled_True() throws Exception {
         runMyTest("testSubmitPropertyDisabled_True", "");
     }
+
     public void testSubmitPropertyDisabled_False1() throws Exception {
         runMyTest("testSubmitPropertyDisabled_False1", "");
     }
+
     public void testSubmitPropertyDisabled_False2() throws Exception {
         runMyTest("testSubmitPropertyDisabled_False2", "");
     }
+
     public void testSubmitPropertyOnblur() throws Exception {
         runMyTest("testSubmitPropertyOnblur", "");
     }
+
     public void testSubmitPropertyOnchange() throws Exception {
         runMyTest("testSubmitPropertyOnchange", "");
     }
+
     public void testSubmitPropertyOnclick() throws Exception {
         runMyTest("testSubmitPropertyOnclick", "");
     }
+
     public void testSubmitPropertyOndblclick() throws Exception {
         runMyTest("testSubmitPropertyOndblclick", "");
     }
+
     public void testSubmitPropertyOnfocus() throws Exception {
         runMyTest("testSubmitPropertyOnfocus", "");
     }
+
     public void testSubmitPropertyOnkeydown() throws Exception {
         runMyTest("testSubmitPropertyOnkeydown", "");
     }
+
     public void testSubmitPropertyOnkeypress() throws Exception {
         runMyTest("testSubmitPropertyOnkeypress", "");
     }
+
     public void testSubmitPropertyOnkeyup() throws Exception {
         runMyTest("testSubmitPropertyOnkeyup", "");
     }
+
     public void testSubmitPropertyOnmousedown() throws Exception {
         runMyTest("testSubmitPropertyOnmousedown", "");
     }
+
     public void testSubmitPropertyOnmousemove() throws Exception {
         runMyTest("testSubmitPropertyOnmousemove", "");
     }
+
     public void testSubmitPropertyOnmouseout() throws Exception {
         runMyTest("testSubmitPropertyOnmouseout", "");
     }
+
     public void testSubmitPropertyOnmouseover() throws Exception {
         runMyTest("testSubmitPropertyOnmouseover", "");
     }
+
     public void testSubmitPropertyOnmouseup() throws Exception {
         runMyTest("testSubmitPropertyOnmouseup", "");
     }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag2.java Fri Feb 10 13:05:03 2006
@@ -17,23 +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.SubmitTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.SubmitTag</code>
+ * class.
  */
 public class TestSubmitTag2 extends JspTestCase {
 
@@ -52,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestSubmitTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestSubmitTag2.class.getName() });
     }
 
     /**
@@ -65,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/TestSubmitTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestSubmitTag2.jsp");
     }
 
     /*
@@ -77,42 +79,55 @@
     public void testSubmitPropertyStyle() throws Exception {
         runMyTest("testSubmitPropertyStyle", "");
     }
+
     public void testSubmitPropertyStyleClass() throws Exception {
         runMyTest("testSubmitPropertyStyleClass", "");
     }
+
     public void testSubmitPropertyStyleId() throws Exception {
         runMyTest("testSubmitPropertyStyleId", "");
     }
+
     public void testSubmitPropertyTabindex() throws Exception {
         runMyTest("testSubmitPropertyTabindex", "");
     }
+
     public void testSubmitPropertyTitle() throws Exception {
         runMyTest("testSubmitPropertyTitle", "");
     }
+
     public void testSubmitPropertyTitleKey() throws Exception {
         runMyTest("testSubmitPropertyTitleKey", "");
     }
+
     public void testSubmitPropertyTitleKey_fr() throws Exception {
         runMyTest("testSubmitPropertyTitleKey_fr", "fr");
     }
+
     public void testSubmitPropertyValue() throws Exception {
         runMyTest("testSubmitPropertyValue", "");
     }
+
     public void testSubmitPropertyBodyContent() throws Exception {
         runMyTest("testSubmitPropertyBodyContent", "");
     }
+
     public void testSubmitPropertyBodyContentMessageKey() throws Exception {
         runMyTest("testSubmitPropertyBodyContentMessageKey", "");
     }
-    public void testSubmitPropertyBodyContentMessageKey_fr() throws Exception {
+
+    public void testSubmitPropertyBodyContentMessageKey_fr()
+            throws Exception {
         runMyTest("testSubmitPropertyBodyContentMessageKey_fr", "fr");
     }
+
     public void testSubmitPropertyIndexedArray() throws Exception {
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testSubmitPropertyIndexedArray", "");
     }
+
     public void testSubmitPropertyIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
@@ -121,12 +136,14 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testSubmitPropertyIndexedArrayProperty", "");
     }
+
     public void testSubmitPropertyIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testSubmitPropertyIndexedMap", "");
     }
+
     public void testSubmitPropertyIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
@@ -135,12 +152,15 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testSubmitPropertyIndexedMapProperty", "");
     }
+
     public void testSubmitPropertyIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testSubmitPropertyIndexedEnumeration", "");
     }
-    public void testSubmitPropertyIndexedEnumerationProperty() throws Exception {
+
+    public void testSubmitPropertyIndexedEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag1.java Fri Feb 10 13:05:03 2006
@@ -17,20 +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.TextTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.TextTag</code>
+ * class.
  */
 public class TestTextTag1 extends JspTestCase {
 
@@ -49,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestTextTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestTextTag1.class.getName() });
     }
 
     /**
@@ -62,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/TestTextTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestTextTag1.jsp");
     }
 
     /*
@@ -74,69 +78,91 @@
     public void testTextProperty() throws Exception {
         runMyTest("testTextProperty", "");
     }
+
     public void testTextPropertyAccesskey() throws Exception {
         runMyTest("testTextPropertyAccesskey", "");
     }
+
     public void testTextPropertyAlt() throws Exception {
         runMyTest("testTextPropertyAlt", "");
     }
+
     public void testTextPropertyAltKey1() throws Exception {
         runMyTest("testTextPropertyAltKey1", "");
     }
+
     public void testTextPropertyAltKey2() throws Exception {
         runMyTest("testTextPropertyAltKey2", "");
     }
+
     public void testTextPropertyAltKey3() throws Exception {
         runMyTest("testTextPropertyAltKey3", "");
     }
+
     public void testTextPropertyAltKey_fr1() throws Exception {
         runMyTest("testTextPropertyAltKey1_fr", "fr");
     }
+
     public void testTextPropertyAltKey_fr2() throws Exception {
         runMyTest("testTextPropertyAltKey2_fr", "fr");
     }
+
     public void testTextPropertyDisabled() throws Exception {
         runMyTest("testTextPropertyDisabled", "");
     }
+
     public void testTextPropertyMaxlength() throws Exception {
         runMyTest("testTextPropertyMaxlength", "");
     }
+
     public void testTextPropertyOnblur() throws Exception {
         runMyTest("testTextPropertyOnblur", "");
     }
+
     public void testTextPropertyOnchange() throws Exception {
         runMyTest("testTextPropertyOnchange", "");
     }
+
     public void testTextPropertyOnclick() throws Exception {
         runMyTest("testTextPropertyOnclick", "");
     }
+
     public void testTextPropertyOndblclick() throws Exception {
         runMyTest("testTextPropertyOndblclick", "");
     }
+
     public void testTextPropertyOnfocus() throws Exception {
         runMyTest("testTextPropertyOnfocus", "");
     }
+
     public void testTextPropertyOnkeydown() throws Exception {
         runMyTest("testTextPropertyOnkeydown", "");
     }
+
     public void testTextPropertyOnkeypress() throws Exception {
         runMyTest("testTextPropertyOnkeypress", "");
     }
+
     public void testTextPropertyOnkeyup() throws Exception {
         runMyTest("testTextPropertyOnkeyup", "");
     }
+
     public void testTextPropertyOnmousedown() throws Exception {
         runMyTest("testTextPropertyOnmousedown", "");
     }
+
     public void testTextPropertyOnmousemove() throws Exception {
         runMyTest("testTextPropertyOnmousemove", "");
     }
+
     public void testTextPropertyOnmouseout() throws Exception {
         runMyTest("testTextPropertyOnmouseout", "");
     }
+
     public void testTextPropertyOnmouseover() throws Exception {
         runMyTest("testTextPropertyOnmouseover", "");
     }
+
     public void testTextPropertyOnmouseup() throws Exception {
         runMyTest("testTextPropertyOnmouseup", "");
     }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag2.java Fri Feb 10 13:05:03 2006
@@ -17,23 +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.TextTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.TextTag</code>
+ * class.
  */
 public class TestTextTag2 extends JspTestCase {
 
@@ -52,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestTextTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestTextTag2.class.getName() });
     }
 
     /**
@@ -65,10 +64,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/TestTextTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestTextTag2.jsp");
     }
 
     /*
@@ -78,45 +82,58 @@
     public void testTextPropertyReadonly() throws Exception {
         runMyTest("testTextPropertyReadonly", "");
     }
+
     public void testTextPropertySize() throws Exception {
         runMyTest("testTextPropertySize", "");
     }
+
     public void testTextPropertyStyle() throws Exception {
         runMyTest("testTextPropertyStyle", "");
     }
+
     public void testTextPropertyErrorStyle() throws Exception {
         runMyTest("testTextPropertyErrorStyle", "");
     }
+
     public void testTextPropertyStyleClass() throws Exception {
         runMyTest("testTextPropertyStyleClass", "");
     }
+
     public void testTextPropertyErrorStyleClass() throws Exception {
         runMyTest("testTextPropertyErrorStyleClass", "");
     }
+
     public void testTextPropertyStyleId() throws Exception {
         runMyTest("testTextPropertyStyleId", "");
     }
+
     public void testTextPropertyErrorStyleId() throws Exception {
         runMyTest("testTextPropertyErrorStyleId", "");
     }
+
     public void testTextPropertyTitle() throws Exception {
         runMyTest("testTextPropertyTitle", "");
     }
+
     public void testTextPropertyTitleKey() throws Exception {
         runMyTest("testTextPropertyTitleKey", "");
     }
+
     public void testTextPropertyTitleKey_fr() throws Exception {
         runMyTest("testTextPropertyTitleKey_fr", "fr");
     }
+
     public void testTextPropertyValue() throws Exception {
         runMyTest("testTextPropertyValue", "");
     }
+
     public void testTextPropertyIndexedArray() throws Exception {
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testTextPropertyIndexedArray", "");
     }
+
     public void testTextPropertyIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
@@ -125,12 +142,14 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testTextPropertyIndexedArrayProperty", "");
     }
+
     public void testTextPropertyIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testTextPropertyIndexedMap", "");
     }
+
     public void testTextPropertyIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
@@ -139,12 +158,15 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testTextPropertyIndexedMapProperty", "");
     }
+
     public void testTextPropertyIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testTextPropertyIndexedEnumeration", "");
     }
-    public void testTextPropertyIndexedEnumerationProperty() throws Exception {
+
+    public void testTextPropertyIndexedEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag1.java Fri Feb 10 13:05:03 2006
@@ -17,20 +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.TextareaTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.TextareaTag</code>
+ * class.
  */
 public class TestTextareaTag1 extends JspTestCase {
 
@@ -49,7 +47,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestTextareaTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestTextareaTag1.class.getName() });
     }
 
     /**
@@ -62,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/TestTextareaTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestTextareaTag1.jsp");
     }
 
     /*
@@ -74,69 +78,91 @@
     public void testTextareaProperty() throws Exception {
         runMyTest("testTextareaProperty", "");
     }
+
     public void testTextareaPropertyAccesskey() throws Exception {
         runMyTest("testTextareaPropertyAccesskey", "");
     }
+
     public void testTextareaPropertyAlt() throws Exception {
         runMyTest("testTextareaPropertyAlt", "");
     }
+
     public void testTextareaPropertyAltKey1() throws Exception {
         runMyTest("testTextareaPropertyAltKey1", "");
     }
+
     public void testTextareaPropertyAltKey2() throws Exception {
         runMyTest("testTextareaPropertyAltKey2", "");
     }
+
     public void testTextareaPropertyAltKey3() throws Exception {
         runMyTest("testTextareaPropertyAltKey3", "");
     }
+
     public void testTextareaPropertyAltKey_fr1() throws Exception {
         runMyTest("testTextareaPropertyAltKey1_fr", "fr");
     }
+
     public void testTextareaPropertyAltKey_fr2() throws Exception {
         runMyTest("testTextareaPropertyAltKey2_fr", "fr");
     }
+
     public void testTextareaPropertyCols() throws Exception {
         runMyTest("testTextareaPropertyCols", "");
     }
+
     public void testTextareaPropertyDisabled() throws Exception {
         runMyTest("testTextareaPropertyDisabled", "");
     }
+
     public void testTextareaPropertyOnblur() throws Exception {
         runMyTest("testTextareaPropertyOnblur", "");
     }
+
     public void testTextareaPropertyOnchange() throws Exception {
         runMyTest("testTextareaPropertyOnchange", "");
     }
+
     public void testTextareaPropertyOnclick() throws Exception {
         runMyTest("testTextareaPropertyOnclick", "");
     }
+
     public void testTextareaPropertyOndblclick() throws Exception {
         runMyTest("testTextareaPropertyOndblclick", "");
     }
+
     public void testTextareaPropertyOnfocus() throws Exception {
         runMyTest("testTextareaPropertyOnfocus", "");
     }
+
     public void testTextareaPropertyOnkeydown() throws Exception {
         runMyTest("testTextareaPropertyOnkeydown", "");
     }
+
     public void testTextareaPropertyOnkeypress() throws Exception {
         runMyTest("testTextareaPropertyOnkeypress", "");
     }
+
     public void testTextareaPropertyOnkeyup() throws Exception {
         runMyTest("testTextareaPropertyOnkeyup", "");
     }
+
     public void testTextareaPropertyOnmousedown() throws Exception {
         runMyTest("testTextareaPropertyOnmousedown", "");
     }
+
     public void testTextareaPropertyOnmousemove() throws Exception {
         runMyTest("testTextareaPropertyOnmousemove", "");
     }
+
     public void testTextareaPropertyOnmouseout() throws Exception {
         runMyTest("testTextareaPropertyOnmouseout", "");
     }
+
     public void testTextareaPropertyOnmouseover() throws Exception {
         runMyTest("testTextareaPropertyOnmouseover", "");
     }
+
     public void testTextareaPropertyOnmouseup() throws Exception {
         runMyTest("testTextareaPropertyOnmouseup", "");
     }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag2.java Fri Feb 10 13:05:03 2006
@@ -17,23 +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.TextareaTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.html.TextareaTag</code>
+ * class.
  */
 public class TestTextareaTag2 extends JspTestCase {
 
@@ -52,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestTextareaTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestTextareaTag2.class.getName() });
     }
 
     /**
@@ -65,10 +64,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/TestTextareaTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/html/TestTextareaTag2.jsp");
     }
 
     /*
@@ -78,45 +82,58 @@
     public void testTextareaPropertyReadonly() throws Exception {
         runMyTest("testTextareaPropertyReadonly", "");
     }
+
     public void testTextareaPropertyRows() throws Exception {
         runMyTest("testTextareaPropertyRows", "");
     }
+
     public void testTextareaPropertyStyle() throws Exception {
         runMyTest("testTextareaPropertyStyle", "");
     }
+
     public void testTextareaPropertyErrorStyle() throws Exception {
         runMyTest("testTextareaPropertyErrorStyle", "");
     }
+
     public void testTextareaPropertyStyleClass() throws Exception {
         runMyTest("testTextareaPropertyStyleClass", "");
     }
+
     public void testTextareaPropertyErrorStyleClass() throws Exception {
         runMyTest("testTextareaPropertyErrorStyleClass", "");
     }
+
     public void testTextareaPropertyStyleId() throws Exception {
         runMyTest("testTextareaPropertyStyleId", "");
     }
+
     public void testTextareaPropertyErrorStyleId() throws Exception {
         runMyTest("testTextareaPropertyErrorStyleId", "");
     }
+
     public void testTextareaPropertyTitle() throws Exception {
         runMyTest("testTextareaPropertyTitle", "");
     }
+
     public void testTextareaPropertyTitleKey() throws Exception {
         runMyTest("testTextareaPropertyTitleKey", "");
     }
+
     public void testTextareaPropertyTitleKey_fr() throws Exception {
         runMyTest("testTextareaPropertyTitleKey_fr", "fr");
     }
+
     public void testTextareaPropertyValue() throws Exception {
         runMyTest("testTextareaPropertyValue", "");
     }
+
     public void testTextareaPropertyIndexedArray() throws Exception {
         ArrayList lst = new ArrayList();
         lst.add("Test Message");
         pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
         runMyTest("testTextareaPropertyIndexedArray", "");
     }
+
     public void testTextareaPropertyIndexedArrayProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
@@ -125,12 +142,14 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testTextareaPropertyIndexedArrayProperty", "");
     }
+
     public void testTextareaPropertyIndexedMap() throws Exception {
         HashMap map = new HashMap();
         map.put("tst1", "Test Message");
         pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
         runMyTest("testTextareaPropertyIndexedMap", "");
     }
+
     public void testTextareaPropertyIndexedMapProperty() throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         HashMap map = new HashMap();
@@ -139,12 +158,15 @@
         pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
         runMyTest("testTextareaPropertyIndexedMapProperty", "");
     }
+
     public void testTextareaPropertyIndexedEnumeration() throws Exception {
         StringTokenizer st = new StringTokenizer("Test Message");
         pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
         runMyTest("testTextareaPropertyIndexedEnumeration", "");
     }
-    public void testTextareaPropertyIndexedEnumerationProperty() throws Exception {
+
+    public void testTextareaPropertyIndexedEnumerationProperty()
+            throws Exception {
         SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         StringTokenizer st = new StringTokenizer("Test Message");
         sbft.setEnumeration(st);

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEmptyTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEmptyTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEmptyTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEmptyTag.java Fri Feb 10 13:05:03 2006
@@ -17,26 +17,24 @@
  */
 package org.apache.struts.taglib.logic;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import javax.servlet.ServletException;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 import org.apache.struts.util.LabelValueBean;
 
+import javax.servlet.ServletException;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.logic.EmptyTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.logic.EmptyTag</code>
+ * class.
  */
 public class TestEmptyTag extends JspTestCase {
-	
+
     /**
      * Defines the testcase name for JUnit.
      *
@@ -52,7 +50,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestEmptyTag.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestEmptyTag.class.getName() });
     }
 
     /**
@@ -64,113 +63,387 @@
         return new TestSuite(TestEmptyTag.class);
     }
 
-    private void runNameTest(String testKey, EmptyTag et, 
-    		Object o, int scope, String whichScope, boolean condition, boolean useProperty, String property)
-	    		throws ServletException,  JspException {
-
-		pageContext.setAttribute(testKey, o, scope);
-		et.setPageContext(pageContext);
-		et.setName(testKey);
-		if (useProperty){
-			et.setProperty(property);
-		}
-		et.setScope(whichScope);
+    private void runNameTest(String testKey, EmptyTag et,
+                             Object o, int scope, String whichScope,
+                             boolean condition, boolean useProperty,
+                             String property)
+            throws ServletException, JspException {
+
+        pageContext.setAttribute(testKey, o, scope);
+        et.setPageContext(pageContext);
+        et.setName(testKey);
+        if (useProperty) {
+            et.setProperty(property);
+        }
+        et.setScope(whichScope);
 
         assertEquals(
-        	"Testing " + testKey + " with EmtpyTag in " + whichScope + " scope", 
-        	condition,
-        	et.condition());
+                "Testing " + testKey + " with EmtpyTag in " + whichScope
+                        + " scope",
+                condition,
+                et.condition());
     }
 
     /**
-     * Testing <code>EmptyTag</code> using name attribute in
-     * the some scope.
-    */
-    public void testEmptyTagUsingName() 
-    	throws ServletException,  JspException {
-    	
-    	String tst = "";
-    	runNameTest("testStringEmptyString", new EmptyTag(), tst, PageContext.APPLICATION_SCOPE, "application", true, false, null);
-    	runNameTest("testStringEmptyString", new EmptyTag(), tst, PageContext.SESSION_SCOPE, "session", true, false, null);
-    	runNameTest("testStringEmptyString", new EmptyTag(), tst, PageContext.REQUEST_SCOPE, "request", true, false, null);
-		
-		tst = "hello";
-    	runNameTest("testStringNotEmpty", new EmptyTag(), tst, PageContext.APPLICATION_SCOPE, "application", false, false, null);
-    	runNameTest("testStringNotEmpty", new EmptyTag(), tst, PageContext.SESSION_SCOPE, "session", false, false, null);
-    	runNameTest("testStringNotEmpty", new EmptyTag(), tst, PageContext.REQUEST_SCOPE, "request", false, false, null);
+     * Testing <code>EmptyTag</code> using name attribute in the some scope.
+     */
+    public void testEmptyTagUsingName()
+            throws ServletException, JspException {
 
-		// Testing ArrayList
+        String tst = "";
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                tst,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                false,
+                null);
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                tst,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                false,
+                null);
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                tst,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                false,
+                null);
+
+        tst = "hello";
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                tst,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                false,
+                null);
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                tst,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                false,
+                null);
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                tst,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                false,
+                null);
+
+        // Testing ArrayList
         ArrayList lst = new ArrayList();
-    	runNameTest("testArrayListEmpty", new EmptyTag(), lst, PageContext.APPLICATION_SCOPE, "application", true, false, null);
-    	runNameTest("testArrayListEmpty", new EmptyTag(), lst, PageContext.SESSION_SCOPE, "session", true, false, null);
-    	runNameTest("testArrayListEmpty", new EmptyTag(), lst, PageContext.REQUEST_SCOPE, "request", true, false, null);
-		
-		lst.add(0, "test");
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), lst, PageContext.APPLICATION_SCOPE, "application", false, false, null);
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), lst, PageContext.SESSION_SCOPE, "session", false, false, null);
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), lst, PageContext.REQUEST_SCOPE, "request", false, false, null);
-
-		// Testing HashMap
-		HashMap map = new HashMap();
-    	runNameTest("testMapEmpty", new EmptyTag(), map, PageContext.APPLICATION_SCOPE, "application", true, false, null);
-    	runNameTest("testMapEmpty", new EmptyTag(), map, PageContext.SESSION_SCOPE, "session", true, false, null);
-    	runNameTest("testMapEmpty", new EmptyTag(), map, PageContext.REQUEST_SCOPE, "request", true, false, null);
-		
-		map.put("testKey", "test");
-    	runNameTest("testMapNotEmpty", new EmptyTag(), map, PageContext.APPLICATION_SCOPE, "application", false, false, null);
-    	runNameTest("testMapNotEmpty", new EmptyTag(), map, PageContext.SESSION_SCOPE, "session", false, false, null);
-    	runNameTest("testMapNotEmpty", new EmptyTag(), map, PageContext.REQUEST_SCOPE, "request", false, false, null);
-		
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                false,
+                null);
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                false,
+                null);
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                false,
+                null);
+
+        lst.add(0, "test");
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                false,
+                null);
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                false,
+                null);
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                lst,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                false,
+                null);
+
+        // Testing HashMap
+        HashMap map = new HashMap();
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                false,
+                null);
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                false,
+                null);
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                false,
+                null);
+
+        map.put("testKey", "test");
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                false,
+                null);
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                false,
+                null);
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                map,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                false,
+                null);
+
     }
-    
+
     /**
-     * Testing <code>EmptyTag</code> using name attribute in
-     * the some scope.
-    */
-    public void testEmptyTagUsingProperty() 
-    	throws ServletException,  JspException {
-    	
-    	LabelValueBean lvb = new LabelValueBean(null, null);
-    	runNameTest("testStringEmptyString", new EmptyTag(), lvb, PageContext.APPLICATION_SCOPE, "application", true, true, "value");
-    	runNameTest("testStringEmptyString", new EmptyTag(), lvb, PageContext.SESSION_SCOPE, "session", true, true, "value");
-    	runNameTest("testStringEmptyString", new EmptyTag(), lvb, PageContext.REQUEST_SCOPE, "request", true, true, "value");
-		
-		lvb.setValue("");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.APPLICATION_SCOPE, "application", true, true, "value");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.SESSION_SCOPE, "session", true, true, "value");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.REQUEST_SCOPE, "request", true, true, "value");
-
-		lvb.setValue("hello");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.APPLICATION_SCOPE, "application", false, true, "value");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.SESSION_SCOPE, "session", false, true, "value");
-    	runNameTest("testStringNotEmpty", new EmptyTag(), lvb, PageContext.REQUEST_SCOPE, "request", false, true, "value");
+     * Testing <code>EmptyTag</code> using name attribute in the some scope.
+     */
+    public void testEmptyTagUsingProperty()
+            throws ServletException, JspException {
+
+        LabelValueBean lvb = new LabelValueBean(null, null);
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                lvb,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                true,
+                "value");
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                lvb,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                true,
+                "value");
+        runNameTest("testStringEmptyString",
+                new EmptyTag(),
+                lvb,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                true,
+                "value");
+
+        lvb.setValue("");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                true,
+                "value");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                true,
+                "value");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                true,
+                "value");
+
+        lvb.setValue("hello");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                true,
+                "value");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                true,
+                "value");
+        runNameTest("testStringNotEmpty",
+                new EmptyTag(),
+                lvb,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                true,
+                "value");
 
-		// Testing ArrayList
-		SimpleBeanForTesting sbft = new SimpleBeanForTesting();
+        // Testing ArrayList
+        SimpleBeanForTesting sbft = new SimpleBeanForTesting();
         ArrayList lst = new ArrayList();
-		sbft.setList(lst);
-    	runNameTest("testArrayListEmpty", new EmptyTag(), sbft, PageContext.APPLICATION_SCOPE, "application", true, true, "list");
-    	runNameTest("testArrayListEmpty", new EmptyTag(), sbft, PageContext.SESSION_SCOPE, "session", true, true, "list");
-    	runNameTest("testArrayListEmpty", new EmptyTag(), sbft, PageContext.REQUEST_SCOPE, "request", true, true, "list");
-		
-		lst.add(0, "test");
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), sbft, PageContext.APPLICATION_SCOPE, "application", false, true, "list");
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), sbft, PageContext.SESSION_SCOPE, "session", false, true, "list");
-    	runNameTest("testArrayListNotEmpty", new EmptyTag(), sbft, PageContext.REQUEST_SCOPE, "request", false, true, "list");
-
-		// Testing HashMap
-		HashMap map = new HashMap();
-		sbft.setMap(map);
-    	runNameTest("testMapEmpty", new EmptyTag(), sbft, PageContext.APPLICATION_SCOPE, "application", true, true, "map");
-    	runNameTest("testMapEmpty", new EmptyTag(), sbft, PageContext.SESSION_SCOPE, "session", true, true, "map");
-    	runNameTest("testMapEmpty", new EmptyTag(), sbft, PageContext.REQUEST_SCOPE, "request", true, true, "map");
-		
-		map.put("testKey", "test");
-    	runNameTest("testMapNotEmpty", new EmptyTag(), sbft, PageContext.APPLICATION_SCOPE, "application", false, true, "map");
-    	runNameTest("testMapNotEmpty", new EmptyTag(), sbft, PageContext.SESSION_SCOPE, "session", false, true, "map");
-    	runNameTest("testMapNotEmpty", new EmptyTag(), sbft, PageContext.REQUEST_SCOPE, "request", false, true, "map");
-		
+        sbft.setList(lst);
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                true,
+                "list");
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                true,
+                "list");
+        runNameTest("testArrayListEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                true,
+                "list");
+
+        lst.add(0, "test");
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                true,
+                "list");
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                true,
+                "list");
+        runNameTest("testArrayListNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                true,
+                "list");
+
+        // Testing HashMap
+        HashMap map = new HashMap();
+        sbft.setMap(map);
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                true,
+                true,
+                "map");
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.SESSION_SCOPE,
+                "session",
+                true,
+                true,
+                "map");
+        runNameTest("testMapEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                true,
+                true,
+                "map");
+
+        map.put("testKey", "test");
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.APPLICATION_SCOPE,
+                "application",
+                false,
+                true,
+                "map");
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.SESSION_SCOPE,
+                "session",
+                false,
+                true,
+                "map");
+        runNameTest("testMapNotEmpty",
+                new EmptyTag(),
+                sbft,
+                PageContext.REQUEST_SCOPE,
+                "request",
+                false,
+                true,
+                "map");
+
     }
-    
-    
+
+
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEqualTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEqualTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEqualTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEqualTag.java Fri Feb 10 13:05:03 2006
@@ -17,28 +17,26 @@
  */
 package org.apache.struts.taglib.logic;
 
-import javax.servlet.ServletException;
-import javax.servlet.jsp.JspException;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.JspTestCase;
 import org.apache.cactus.WebRequest;
 
+import javax.servlet.ServletException;
+import javax.servlet.jsp.JspException;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.logic.EqualTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.logic.EqualTag</code>
+ * class.
  */
 public class TestEqualTag extends JspTestCase {
 
     protected final static String COOKIE_KEY =
-        "org.apache.struts.taglib.logic.COOKIE_KEY";
+            "org.apache.struts.taglib.logic.COOKIE_KEY";
     protected final static String HEADER_KEY =
-        "org.apache.struts.taglib.logic.HEADER_KEY";
+            "org.apache.struts.taglib.logic.HEADER_KEY";
     protected final static String PARAMETER_KEY =
-        "org.apache.struts.taglib.logic.PARAMETER_KEY";
+            "org.apache.struts.taglib.logic.PARAMETER_KEY";
 
     protected final static String testStringKey = "testString";
     protected final static String testStringValue = "abc";
@@ -46,7 +44,7 @@
     protected final static String testIntegerKey = "testInteger";
     protected final static Integer testIntegerValue = new Integer(21);
     protected final static Integer testIntegerValue1 =
-        new Integer(testIntegerValue.intValue() + 1);
+            new Integer(testIntegerValue.intValue() + 1);
 
     protected EqualTag et = null;
 
@@ -65,7 +63,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestEqualTag.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestEqualTag.class.getName() });
     }
 
     /**
@@ -87,11 +86,8 @@
         et = null;
     }
 
-
-
     // --------------------------------------------------- Cookie String Equals
 
-
     /* FIXME: Cactus does not send cookies?
     public void beginCookieStringEquals(WebRequest testRequest) {
 
@@ -112,7 +108,6 @@
     }
     */
 
-
     // ----------------------------------------------- Cookie String Not Equals
 
 
@@ -124,17 +119,16 @@
 
 
     public void testCookieStringNotEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         et.setCookie(COOKIE_KEY);
         et.setValue(testStringValue1);
 
         assertEquals("Cookie string not equals comparison", false,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // --------------------------------------------------- Header String Equals
 
 
@@ -146,17 +140,16 @@
 
 
     public void testHeaderStringEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         et.setHeader(HEADER_KEY);
         et.setValue(testStringValue);
 
         assertEquals("Header string equals comparison", true,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // ----------------------------------------------- Header String Not Equals
 
 
@@ -168,49 +161,46 @@
 
 
     public void testHeaderStringNotEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         et.setHeader(HEADER_KEY);
         et.setValue(testStringValue1);
 
         assertEquals("Header string not equals comparison", false,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // --------------------------------------------------------- Integer Equals
 
 
     public void testIntegerEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         request.setAttribute(testIntegerKey, testIntegerValue);
-	et.setName(testIntegerKey);
-	et.setValue(testIntegerValue.toString());
-	
+        et.setName(testIntegerKey);
+        et.setValue(testIntegerValue.toString());
+
         assertEquals("Integer equals comparison", true,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // ----------------------------------------------------- Integer Not Equals
 
 
     public void testIntegerNotEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         request.setAttribute(testIntegerKey, testIntegerValue);
-	et.setName(testIntegerKey);
-	et.setValue(testIntegerValue1.toString());
-	
+        et.setName(testIntegerKey);
+        et.setValue(testIntegerValue1.toString());
+
         assertEquals("Integer not equals comparison", false,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // ------------------------------------------------ Parameter String Equals
 
 
@@ -222,17 +212,16 @@
 
 
     public void testParameterStringEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         et.setParameter(PARAMETER_KEY);
         et.setValue(testStringValue);
 
         assertEquals("Parameter string equals comparison", true,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // -------------------------------------------- Parameter String Not Equals
 
 
@@ -244,48 +233,45 @@
 
 
     public void testParameterStringNotEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         et.setParameter(PARAMETER_KEY);
         et.setValue(testStringValue1);
 
         assertEquals("Parameter string not equals comparison", false,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // ---------------------------------------------------------- String Equals
 
 
     public void testStringEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         request.setAttribute(testStringKey, testStringValue);
-	et.setName(testStringKey);
-	et.setValue(testStringValue);
-	
+        et.setName(testStringKey);
+        et.setValue(testStringValue);
+
         assertEquals("String equals comparison", true,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
 
-
     // ------------------------------------------------------ String Not Equals
 
 
     public void testStringNotEquals()
-        throws ServletException, JspException {
+            throws ServletException, JspException {
 
         request.setAttribute(testStringKey, testStringValue);
-	et.setName(testStringKey);
-	et.setValue(testStringValue1);
-	
+        et.setName(testStringKey);
+        et.setValue(testStringValue1);
+
         assertEquals("String not equals comparison", false,
-                     et.condition(0, 0));
+                et.condition(0, 0));
 
     }
-
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterEqualTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterEqualTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterEqualTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterEqualTag.java Fri Feb 10 13:05:03 2006
@@ -17,25 +17,28 @@
  */
 package org.apache.struts.taglib.logic;
 
-import javax.servlet.ServletException;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.PageContext;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.cactus.JspTestCase;
 import org.apache.cactus.WebRequest;
 import org.apache.struts.util.LabelValueBean;
 
+import javax.servlet.ServletException;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+
 /**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.logic.GreaterEqualTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.logic.GreaterEqualTag</code>
+ * class.
  */
 public class TestGreaterEqualTag extends JspTestCase {
-	
-    protected final static String COOKIE_KEY = "org.apache.struts.taglib.logic.COOKIE_KEY";
-    protected final static String HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY";
-    protected final static String PARAMETER_KEY = "org.apache.struts.taglib.logic.PARAMETER_KEY";
+
+    protected final static String COOKIE_KEY =
+            "org.apache.struts.taglib.logic.COOKIE_KEY";
+    protected final static String HEADER_KEY =
+            "org.apache.struts.taglib.logic.HEADER_KEY";
+    protected final static String PARAMETER_KEY =
+            "org.apache.struts.taglib.logic.PARAMETER_KEY";
     protected final static String GREATER_VAL = "5";
     protected final static String LESSER_VAL = "5";
 
@@ -55,7 +58,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestGreaterEqualTag.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestGreaterEqualTag.class.getName() });
     }
 
     /**
@@ -68,10 +72,10 @@
     }
 
     //----- Test initApplication() method --------------------------------------
-	
+
     /**
      * Create cookie for testCookiePresent method test.
-    */
+     */
     /* FIXME: Cactus does not send cookies?
     public void beginCookieGreaterEqual(WebRequest testRequest) {
        testRequest.addCookie(COOKIE_KEY, GREATER_VAL);
@@ -80,21 +84,21 @@
 
     /**
      * Create header for testHeaderGreaterEqual method test.
-    */
+     */
     public void beginHeaderGreaterEqual(WebRequest testRequest) {
-       testRequest.addHeader(HEADER_KEY, GREATER_VAL);
+        testRequest.addHeader(HEADER_KEY, GREATER_VAL);
     }
 
     /**
      * Create header for testParameterGreaterEqual method test.
-    */
+     */
     public void beginParameterGreaterEqual(WebRequest testRequest) {
-       testRequest.addParameter(PARAMETER_KEY, GREATER_VAL);
+        testRequest.addParameter(PARAMETER_KEY, GREATER_VAL);
     }
 
     /**
      * Verify the value stored in a cookie using <code>GreaterEqualTag</code>.
-    */
+     */
     /* FIXME: Cactus does not send cookies?
     public void testCookieGreaterEqual() throws ServletException,  JspException {
         GreaterEqualTag ge = new GreaterEqualTag();
@@ -107,180 +111,196 @@
         	ge.condition());
     }
     */
-    
+
     /**
      * Verify the value stored in header using <code>GreaterEqualTag</code>.
-    */
-    public void testHeaderGreaterEqual() throws ServletException,  JspException {
+     */
+    public void testHeaderGreaterEqual()
+            throws ServletException, JspException {
         GreaterEqualTag ge = new GreaterEqualTag();
         ge.setPageContext(pageContext);
         ge.setHeader(HEADER_KEY);
         ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Header Value (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
-        	ge.condition());
+                "Header Value (" + GREATER_VAL
+                        + ") is greater than or equal to value (" + LESSER_VAL
+                        + ")",
+                ge.condition());
     }
 
     /**
      * Verify the value stored in parameter using <code>GreaterEqualTag</code>.
-    */
-    public void testParameterGreaterEqual() throws ServletException,  JspException {
+     */
+    public void testParameterGreaterEqual()
+            throws ServletException, JspException {
         GreaterEqualTag ge = new GreaterEqualTag();
         ge.setPageContext(pageContext);
         ge.setParameter(PARAMETER_KEY);
         ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Parameter Value (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
-        	ge.condition());
+                "Parameter Value (" + GREATER_VAL
+                        + ") is greater than or equal to value (" + LESSER_VAL
+                        + ")",
+                ge.condition());
     }
-    
+
 
     /**
-     * Testing <code>GreaterEqualTag</code> using name attribute in
-     * the application scope.
-    */
-    public void testApplicationScopeNameGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name attribute in the
+     * application scope.
+     */
+    public void testApplicationScopeNameGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testApplicationScopeNameGreaterEqual";
-		Integer itgr = new Integer(GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, itgr, PageContext.APPLICATION_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("application");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testApplicationScopeNameGreaterEqual";
+        Integer itgr = new Integer(GREATER_VAL);
+
+        pageContext
+                .setAttribute(testKey, itgr, PageContext.APPLICATION_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("application");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Application scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
-        	ge.condition());
+                "Application scope value from name (" + GREATER_VAL
+                        + ") is greater than or equal to value (" + LESSER_VAL
+                        + ")",
+                ge.condition());
     }
 
     /**
-     * Testing <code>GreaterEqualTag</code> using name attribute in
-     * the session scope.
-    */
-    public void testSessionScopeNameGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name attribute in the
+     * session scope.
+     */
+    public void testSessionScopeNameGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testSessionScopeNameGreaterEqual";
-		Integer itgr = new Integer(GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, itgr, PageContext.SESSION_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("session");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testSessionScopeNameGreaterEqual";
+        Integer itgr = new Integer(GREATER_VAL);
+
+        pageContext.setAttribute(testKey, itgr, PageContext.SESSION_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("session");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Session scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
-        	ge.condition());
+                "Session scope value from name (" + GREATER_VAL
+                        + ") is greater than or equal to value (" + LESSER_VAL
+                        + ")",
+                ge.condition());
     }
 
     /**
-     * Testing <code>GreaterEqualTag</code> using name attribute in
-     * the request scope.
-    */
-    public void testRequestScopeNameGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name attribute in the
+     * request scope.
+     */
+    public void testRequestScopeNameGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testRequestScopeNameGreaterEqual";
-		Integer itgr = new Integer(GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, itgr, PageContext.REQUEST_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("request");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testRequestScopeNameGreaterEqual";
+        Integer itgr = new Integer(GREATER_VAL);
+
+        pageContext.setAttribute(testKey, itgr, PageContext.REQUEST_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("request");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Request scope value from name (" + GREATER_VAL + ") is greater than or equal to value (" + LESSER_VAL + ")", 
-        	ge.condition());
+                "Request scope value from name (" + GREATER_VAL
+                        + ") is greater than or equal to value (" + LESSER_VAL
+                        + ")",
+                ge.condition());
     }
 
 
-
-
     /**
-     * Testing <code>GreaterEqualTag</code> using name and property attribute in
-     * the application scope.
-    */
-    public void testApplicationScopePropertyGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name and property attribute
+     * in the application scope.
+     */
+    public void testApplicationScopePropertyGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testApplicationScopePropertyGreaterEqual";
-		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, lvb, PageContext.APPLICATION_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("application");
-		ge.setProperty("value");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testApplicationScopePropertyGreaterEqual";
+        LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
+
+        pageContext.setAttribute(testKey, lvb, PageContext.APPLICATION_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("application");
+        ge.setProperty("value");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
-        	ge.condition());
+                "Value (" + LESSER_VAL
+                        + ") is greater than or equal to value ("
+                        + GREATER_VAL + ")",
+                ge.condition());
     }
 
     /**
-     * Testing <code>GreaterEqualTag</code> using name and property attribute in
-     * the session scope.
-    */
-    public void testSessionScopePropertyGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name and property attribute
+     * in the session scope.
+     */
+    public void testSessionScopePropertyGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testSessionScopePropertyGreaterEqual";
-		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, lvb, PageContext.SESSION_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("session");
-		ge.setProperty("value");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testSessionScopePropertyGreaterEqual";
+        LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
+
+        pageContext.setAttribute(testKey, lvb, PageContext.SESSION_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("session");
+        ge.setProperty("value");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
-        	ge.condition());
+                "Value (" + LESSER_VAL
+                        + ") is greater than or equal to value ("
+                        + GREATER_VAL + ")",
+                ge.condition());
     }
-    
+
     /**
-     * Testing <code>GreaterEqualTag</code> using name and property attribute in
-     * the request scope.
-    */
-    public void testRequestScopePropertyGreaterEqual() 
-    	throws ServletException,  JspException {
-    
+     * Testing <code>GreaterEqualTag</code> using name and property attribute
+     * in the request scope.
+     */
+    public void testRequestScopePropertyGreaterEqual()
+            throws ServletException, JspException {
+
         GreaterEqualTag ge = new GreaterEqualTag();
 
-		String testKey = "testRequestScopePropertyGreaterEqual";
-		LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
-		
-		pageContext.setAttribute(testKey, lvb, PageContext.REQUEST_SCOPE);
-		ge.setPageContext(pageContext);
-		ge.setName(testKey);
-		ge.setScope("request");
-		ge.setProperty("value");
-		ge.setValue(LESSER_VAL);
+        String testKey = "testRequestScopePropertyGreaterEqual";
+        LabelValueBean lvb = new LabelValueBean("The Key", GREATER_VAL);
+
+        pageContext.setAttribute(testKey, lvb, PageContext.REQUEST_SCOPE);
+        ge.setPageContext(pageContext);
+        ge.setName(testKey);
+        ge.setScope("request");
+        ge.setProperty("value");
+        ge.setValue(LESSER_VAL);
 
         assertTrue(
-        	"Value (" + LESSER_VAL + ") is greater than or equal to value (" + GREATER_VAL + ")",
-        	ge.condition());
+                "Value (" + LESSER_VAL
+                        + ") is greater than or equal to value ("
+                        + GREATER_VAL + ")",
+                ge.condition());
     }
-    
-    
-    
+
+
 }



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