commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r224562 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
Date Sat, 23 Jul 2005 22:27:16 GMT
Author: ggregory
Date: Sat Jul 23 15:27:12 2005
New Revision: 224562

URL: http://svn.apache.org/viewcvs?rev=224562&view=rev
Log:
Sort methods.

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java?rev=224562&r1=224561&r2=224562&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
Sat Jul 23 15:27:12 2005
@@ -31,8 +31,8 @@
  */
 public class VariableFormatterTest extends TestCase {
 
-    private static final String KEY_TARGET = "target";
     private static final String KEY_ANIMAL = "animal";
+    private static final String KEY_TARGET = "target";
     static final String REPLACE_TEMPLATE = "The ${animal} jumps over the ${target}.";
     static final String REPLACE_TEMPLATE_NO_ESCAPE = "The {animal} jumps over the {target}.";
     static final String REPLACE_TEMPLATE_NO_PREFIX = "The $animal} jumps over the $target}.";
@@ -217,6 +217,15 @@
         assertEquals("Variable ${var} is unknown!", this.getFormat().replace("Variable ${var}
is unknown!"));
     }
 
+    void testReplaceNoElement(String badReplaceTemplate) {
+        assertEquals(badReplaceTemplate, this.getFormat().replaceObject(badReplaceTemplate));
+        Map map = this.getValueMap();
+        map.put(KEY_ANIMAL, "cow");
+        map.put(KEY_TARGET, "moon");
+        assertEquals("The cow jumps over the moon.", this.getFormat().replace(REPLACE_TEMPLATE));
+        assertEquals(badReplaceTemplate, this.getFormat().replaceObject(badReplaceTemplate));
+    }
+
     /**
      * Tests a replace template with missing escape strings.
      */
@@ -236,15 +245,6 @@
      */
     public void testReplaceNoSuffix() {
         testReplaceNoElement(REPLACE_TEMPLATE_NO_SUFFIX);
-    }
-
-    void testReplaceNoElement(String badReplaceTemplate) {
-        assertEquals(badReplaceTemplate, this.getFormat().replaceObject(badReplaceTemplate));
-        Map map = this.getValueMap();
-        map.put(KEY_ANIMAL, "cow");
-        map.put(KEY_TARGET, "moon");
-        assertEquals("The cow jumps over the moon.", this.getFormat().replace(REPLACE_TEMPLATE));
-        assertEquals(badReplaceTemplate, this.getFormat().replaceObject(badReplaceTemplate));
     }
 
     /**



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


Mime
View raw message