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 [3/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/TestMessageTag2_fr.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2_fr.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2_fr.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2_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 TestMessageTag2_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[] {TestMessageTag2_fr.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag2_fr.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);
+    }
 
     /*
      * ===========================================================
@@ -93,189 +95,300 @@
      */
 
 
-    public void testMessageTag2ArgKeyNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeySessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag2ArgKeyNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeySessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgKeyRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgKeyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-    public void testMessageTag2ArgNameNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameSessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameSessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag2ArgNameNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameSessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameSessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNameRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag2ArgNameRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-
-    public void testMessageTag2ArgNamePropertyNoScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertySessionScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyRequestScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag2ArgNamePropertyNoScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertySessionScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag2ArgNamePropertyRequestScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.2"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag2ArgNamePropertyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag2ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
+    public void testMessageTag2ArgKeyNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeySessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag2ArgKeyNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeySessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgKeyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgKeyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNameNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameSessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameSessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNameNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameSessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameSessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNameRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag2ArgNameRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNamePropertyNoScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag2ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertySessionScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag2ArgNamePropertyNoScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag2ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertySessionScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag2ArgNamePropertyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.2"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag2ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag2ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3.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 TestMessageTag3 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[] {TestMessageTag3.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag3.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/TestMessageTag3.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/bean/TestMessageTag3.jsp");
     }
 
-        private void formatAndTest(String compare, String output) {
-                //fix for introduced carriage return / line feeds
-                output = replace(output,"\r","");
-                output = replace(output,"\r","");
-                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, "\r", "");
+        output = output.trim();
+        //System.out.println("Testing [" + compare + "] == [" + output + "]");
+        assertEquals(compare, output);
+    }
 
     /*
      * ===========================================================
@@ -94,188 +96,298 @@
 
 
     public void testMessageTag3ArgKeyNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeySessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag3ArgKeyNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeySessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgKeyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-    public void testMessageTag3ArgNameNoScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameApplicationScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameSessionScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameSessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameRequestScopeDefaultBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag3ArgNameNoScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameApplicationScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameSessionScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameSessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNameRequestScopeAlternateBundle() throws Exception {
-     runMyTest("testMessageTag3ArgNameRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-
-
-    public void testMessageTag3ArgNamePropertyNoScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyNoScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertySessionScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertySessionScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyRequestScopeDefaultBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyRequestScopeDefaultBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-
-    public void testMessageTag3ArgNamePropertyNoScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyNoScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertySessionScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertySessionScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyRequestScopeAlternateBundle() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyRequestScopeAlternateBundle", new Locale("",""));
-        }
-        public void endMessageTag3ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL, response.getText());
-        }
+        runMyTest("testMessageTag3ArgKeyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeySessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag3ArgKeyNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeySessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNameNoScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameApplicationScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameSessionScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameSessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameRequestScopeDefaultBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNameNoScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameApplicationScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameSessionScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameSessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNameRequestScopeAlternateBundle()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNamePropertyNoScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertySessionScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyRequestScopeDefaultBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNamePropertyNoScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertySessionScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyRequestScopeAlternateBundle()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("", ""));
+    }
+
+    public void endMessageTag3ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL, response.getText());
+    }
 
 
 }

Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3_fr.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3_fr.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3_fr.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3_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 TestMessageTag3_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[] {TestMessageTag3_fr.class.getName()});
+        junit.awtui.TestRunner
+                .main(new String[] { TestMessageTag3_fr.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/TestMessageTag3.jsp");
+        pageContext
+                .forward("/org/apache/struts/taglib/bean/TestMessageTag3.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);
+    }
 
     /*
      * ===========================================================
@@ -93,189 +95,300 @@
      */
 
 
-    public void testMessageTag3ArgKeyNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeySessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag3ArgKeyNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeySessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgKeyRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgKeyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgKeyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-    public void testMessageTag3ArgNameNoScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameApplicationScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameSessionScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameSessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameSessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameRequestScopeDefaultBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag3ArgNameNoScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameApplicationScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameSessionScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameSessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameSessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNameRequestScopeAlternateBundle_fr() throws Exception {
-     runMyTest("testMessageTag3ArgNameRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNameRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-
-
-    public void testMessageTag3ArgNamePropertyNoScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyNoScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyNoScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertySessionScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertySessionScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertySessionScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyRequestScopeDefaultBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyRequestScopeDefaultBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-
-    public void testMessageTag3ArgNamePropertyNoScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyNoScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyNoScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.APPLICATION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertySessionScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.SESSION_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertySessionScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertySessionScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
-
-    public void testMessageTag3ArgNamePropertyRequestScopeAlternateBundle_fr() throws Exception {
-        pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.3"), PageContext.REQUEST_SCOPE);
-     runMyTest("testMessageTag3ArgNamePropertyRequestScopeAlternateBundle", new Locale("fr","fr"));
-        }
-        public void endMessageTag3ArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
-                formatAndTest(TEST_VAL_FR, response.getText());
-        }
+    public void testMessageTag3ArgKeyNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeySessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag3ArgKeyNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeySessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgKeyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgKeyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgKeyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNameNoScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameSessionScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameSessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameSessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameRequestScopeDefaultBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNameNoScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameSessionScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameSessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameSessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNameRequestScopeAlternateBundle_fr()
+            throws Exception {
+        runMyTest("testMessageTag3ArgNameRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNameRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNamePropertyNoScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyNoScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyNoScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag3ArgNamePropertyApplicationScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyApplicationScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertySessionScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertySessionScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertySessionScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyRequestScopeDefaultBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("default.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyRequestScopeDefaultBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyRequestScopeDefaultBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+
+    public void testMessageTag3ArgNamePropertyNoScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyNoScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyNoScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.APPLICATION_SCOPE);
+        runMyTest(
+                "testMessageTag3ArgNamePropertyApplicationScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyApplicationScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertySessionScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.SESSION_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertySessionScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertySessionScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
+
+    public void testMessageTag3ArgNamePropertyRequestScopeAlternateBundle_fr()
+            throws Exception {
+        pageContext.setAttribute("key",
+                new SimpleBeanForTesting("alternate.bundle.message.3"),
+                PageContext.REQUEST_SCOPE);
+        runMyTest("testMessageTag3ArgNamePropertyRequestScopeAlternateBundle",
+                new Locale("fr", "fr"));
+    }
+
+    public void endMessageTag3ArgNamePropertyRequestScopeAlternateBundle(
+            WebResponse response) {
+        formatAndTest(TEST_VAL_FR, response.getText());
+    }
 
 
 }



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