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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to