Another new boundary tests for VariableFormatterTest.java.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@224650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
16630b35f6
commit
7785367406
|
@ -32,10 +32,17 @@ import org.apache.commons.lang.text.VariableFormatter.MapVariableResolver;
|
|||
public class VariableFormatterTest extends TestCase {
|
||||
|
||||
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_MARKERS = "The animal jumps over the target.";
|
||||
|
||||
static final String REPLACE_TEMPLATE_NO_PREFIX = "The $animal} jumps over the $target}.";
|
||||
|
||||
static final String REPLACE_TEMPLATE_NO_SUFFIX = "The ${animal jumps over the ${target.";
|
||||
|
||||
private VariableFormatter format;
|
||||
|
@ -240,6 +247,13 @@ public class VariableFormatterTest extends TestCase {
|
|||
testReplaceNoElement(REPLACE_TEMPLATE_NO_PREFIX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests a replace template with missing prefix strings.
|
||||
*/
|
||||
public void testReplaceNoMarkers() {
|
||||
testReplaceNoElement(REPLACE_TEMPLATE_NO_MARKERS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests a replace template with missing postfix strings.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue