commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r225152 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
Date Mon, 25 Jul 2005 16:43:09 GMT
Author: ggregory
Date: Mon Jul 25 09:43:07 2005
New Revision: 225152

URL: http://svn.apache.org/viewcvs?rev=225152&view=rev
Log:
Another new boundary tests for VariableFormatterTest.java:  testReplaceEmptyKeys.

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=225152&r1=225151&r2=225152&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
Mon Jul 25 09:43:07 2005
@@ -37,6 +37,8 @@
 
     static final String REPLACE_TEMPLATE = "The ${animal} jumps over the ${target}.";
 
+    static final String REPLACE_TEMPLATE_EMPTY_KEYS = "The ${} jumps over the ${}.";
+
     static final String REPLACE_TEMPLATE_NO_ESCAPE = "The {animal} jumps over the {target}.";
 
     static final String REPLACE_TEMPLATE_NO_MARKERS = "The animal jumps over the target.";
@@ -248,10 +250,22 @@
     }
 
     /**
-     * Tests a replace template with missing prefix strings.
+     * Tests a replace template with missing marker strings.
      */
     public void testReplaceNoMarkers() {
         testReplaceNoElement(REPLACE_TEMPLATE_NO_MARKERS);
+    }
+
+    /**
+     * Tests a replace template with missing empty marker strings.
+     */
+    public void testReplaceEmptyKeys() {
+        try {
+            testReplaceNoElement(REPLACE_TEMPLATE_EMPTY_KEYS);
+            fail("Expected IllegalStateException.");
+        } catch (IllegalStateException e) {
+            // expected for now.
+        }
     }
 
     /**



---------------------------------------------------------------------
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