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 [2/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/bean/TestMessageTag1.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1.java Fri Feb 10 13:05:03 2006
@@ -17,29 +17,27 @@
  */
 package org.apache.struts.taglib.bean;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.WebResponse;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 import org.apache.struts.taglib.TaglibTestBase;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
-  * These tests attempt to cover every single possible configuration of the
-  * org.apache.struts.taglib.bean.MessageTag
-  *
-  * I've tried to describe what I'm testing as best as possible by the method names.
-  * To see how I'm testing, refer to the jsp file that these tests forward to.
-  *
-  * All of these tests depend on a value being correctly written on the repose, then
-  * checked here in endXXX method.
-  *
-  */
+ * These tests attempt to cover every single possible configuration of the
+ * org.apache.struts.taglib.bean.MessageTag
+ *
+ * I've tried to describe what I'm testing as best as possible by the method
+ * names. To see how I'm testing, refer to the jsp file that these tests
+ * forward to.
+ *
+ * All of these tests depend on a value being correctly written on the repose,
+ * then checked here in endXXX method.
+ */
 public class TestMessageTag1 extends TaglibTestBase {
 
     protected final static String TEST_KEY = "BeanKey";
@@ -55,7 +53,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestMessageTag1.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag1.class.getName() });
     }
 
     /**
@@ -70,17 +69,20 @@
 
     private void formatAndTest(String compare, String output) {
         //fix for introduced carriage return / line feeds
-        output = replace(output,"\r","");
-        output = replace(output,"\n","");
+        output = replace(output, "\r", "");
+        output = replace(output, "\n", "");
         output = output.trim();
         //System.out.println("Testing [" + compare + "] == [" + output + "]");
         assertEquals(compare, output);
     }
 
     private void runMyTest(String whichTest, Locale locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, locale, PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                locale,
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/bean/TestMessageTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/bean/TestMessageTag1.jsp");
     }
     /*
      * ===========================================================
@@ -94,188 +96,298 @@
 
 
     public void testMessageTag1ArgKeyNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeySessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag1ArgKeyNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeySessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgKeyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-    public void testMessageTag1ArgNameNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameSessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameSessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag1ArgNameNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameSessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameSessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNameRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag1ArgNameRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-
-    public void testMessageTag1ArgNamePropertyNoScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertySessionScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyRequestScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag1ArgNamePropertyNoScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertySessionScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyRequestScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag1ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
+        runMyTest("testMessageTag1ArgKeyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeySessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag1ArgKeyNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeySessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNameNoScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameSessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameSessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNameNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameSessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameSessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNameRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNamePropertyNoScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertySessionScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyRequestScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNamePropertyNoScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertySessionScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyRequestScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag1ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1_fr.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1_fr.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1_fr.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1_fr.java Fri Feb 10 13:05:03 2006
@@ -17,29 +17,27 @@
  */
 package org.apache.struts.taglib.bean;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.WebResponse;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 import org.apache.struts.taglib.TaglibTestBase;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
-  * These tests attempt to cover every single possible configuration of the
-  * org.apache.struts.taglib.bean.MessageTag
-  *
-  * I've tried to describe what I'm testing as best as possible by the method names.
-  * To see how I'm testing, refer to the jsp file that these tests forward to.
-  *
-  * All of these tests depend on a value being correctly written on the repose, then
-  * checked here in endXXX method.
-  *
-  */
+ * These tests attempt to cover every single possible configuration of the
+ * org.apache.struts.taglib.bean.MessageTag
+ *
+ * I've tried to describe what I'm testing as best as possible by the method
+ * names. To see how I'm testing, refer to the jsp file that these tests
+ * forward to.
+ *
+ * All of these tests depend on a value being correctly written on the repose,
+ * then checked here in endXXX method.
+ */
 public class TestMessageTag1_fr extends TaglibTestBase {
 
     protected final static String TEST_KEY = "BeanKey";
@@ -55,7 +53,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestMessageTag1_fr.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag1_fr.class.getName() });
     }
 
     /**
@@ -66,20 +65,24 @@
         // All methods starting with "test" will be executed in the test suite.
         return new TestSuite(TestMessageTag1_fr.class);
     }
+
     private void runMyTest(String whichTest, Locale locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, locale, PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                locale,
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/bean/TestMessageTag1.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/bean/TestMessageTag1.jsp");
     }
 
-        private void formatAndTest(String compare, String output) {
-                //fix for introduced carriage return / line feeds
-                output = replace(output,"\r","");
-                output = replace(output,"\n","");
-                output = output.trim();
-                //System.out.println("Testing [" + compare + "] == [" + output + "]");
-            assertEquals(compare, output);
-        }
+    private void formatAndTest(String compare, String output) {
+        //fix for introduced carriage return / line feeds
+        output = replace(output, "\r", "");
+        output = replace(output, "\n", "");
+        output = output.trim();
+        //System.out.println("Testing [" + compare + "] == [" + output + "]");
+        assertEquals(compare, output);
+    }
 
     /*
      * ===========================================================
@@ -92,189 +95,300 @@
      */
 
 
-    public void testMessageTag1ArgKeyNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeySessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag1ArgKeyNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeySessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgKeyRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgKeyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-    public void testMessageTag1ArgNameNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameSessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameSessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag1ArgNameNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameSessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameSessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNameRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag1ArgNameRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-
-    public void testMessageTag1ArgNamePropertyNoScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertySessionScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyRequestScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag1ArgNamePropertyNoScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertySessionScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag1ArgNamePropertyRequestScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.1"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag1ArgNamePropertyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag1ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
+    public void testMessageTag1ArgKeyNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeySessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag1ArgKeyNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeySessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgKeyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgKeyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNameNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameSessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameSessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNameNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameSessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameSessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNameRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag1ArgNameRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNamePropertyNoScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag1ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertySessionScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag1ArgNamePropertyNoScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag1ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertySessionScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag1ArgNamePropertyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.1"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag1ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag1ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2.java Fri Feb 10 13:05:03 2006
@@ -17,29 +17,27 @@
  */
 package org.apache.struts.taglib.bean;
 
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.cactus.WebResponse;
 import org.apache.struts.Globals;
 import org.apache.struts.taglib.SimpleBeanForTesting;
 import org.apache.struts.taglib.TaglibTestBase;
 
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
 /**
-  * These tests attempt to cover every single possible configuration of the
-  * org.apache.struts.taglib.bean.MessageTag
-  *
-  * I've tried to describe what I'm testing as best as possible by the method names.
-  * To see how I'm testing, refer to the jsp file that these tests forward to.
-  *
-  * All of these tests depend on a value being correctly written on the repose, then
-  * checked here in endXXX method.
-  *
-  */
+ * These tests attempt to cover every single possible configuration of the
+ * org.apache.struts.taglib.bean.MessageTag
+ *
+ * I've tried to describe what I'm testing as best as possible by the method
+ * names. To see how I'm testing, refer to the jsp file that these tests
+ * forward to.
+ *
+ * All of these tests depend on a value being correctly written on the repose,
+ * then checked here in endXXX method.
+ */
 public class TestMessageTag2 extends TaglibTestBase {
 
     protected final static String TEST_KEY = "BeanKey";
@@ -55,7 +53,8 @@
      * @param theArgs the arguments. Not used
      */
     public static void main(String[] theArgs) {
-        junit.awtui.TestRunner.main(new String[] {TestMessageTag2.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag2.class.getName() });
     }
 
     /**
@@ -68,19 +67,22 @@
     }
 
     private void runMyTest(String whichTest, Locale locale) throws Exception {
-        pageContext.setAttribute(Globals.LOCALE_KEY, locale, PageContext.SESSION_SCOPE);
+        pageContext.setAttribute(Globals.LOCALE_KEY,
+                locale,
+                PageContext.SESSION_SCOPE);
         request.setAttribute("runTest", whichTest);
-        pageContext.forward("/org/apache/struts/taglib/bean/TestMessageTag2.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/bean/TestMessageTag2.jsp");
     }
 
-        private void formatAndTest(String compare, String output) {
-                //fix for introduced carriage return / line feeds
-                output = replace(output,"\r","");
-                output = replace(output,"\n","");
-                output = output.trim();
-                //System.out.println("Testing [" + compare + "] == [" + output + "]");
-            assertEquals(compare, output);
-        }
+    private void formatAndTest(String compare, String output) {
+        //fix for introduced carriage return / line feeds
+        output = replace(output, "\r", "");
+        output = replace(output, "\n", "");
+        output = output.trim();
+        //System.out.println("Testing [" + compare + "] == [" + output + "]");
+        assertEquals(compare, output);
+    }
 
     /*
      * ===========================================================
@@ -94,188 +96,298 @@
 
 
     public void testMessageTag2ArgKeyNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeySessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag2ArgKeyNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeySessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgKeyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-    public void testMessageTag2ArgNameNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameSessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameSessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag2ArgNameNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameSessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameSessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNameRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag2ArgNameRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-
-    public void testMessageTag2ArgNamePropertyNoScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertySessionScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyRequestScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag2ArgNamePropertyNoScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertySessionScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyRequestScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag2ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
+        runMyTest("testMessageTag2ArgKeyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeySessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag2ArgKeyNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeySessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNameNoScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameSessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameSessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNameNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameSessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameSessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNameRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNamePropertyNoScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertySessionScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyRequestScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNamePropertyNoScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertySessionScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyRequestScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag2ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
 
 
 }



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