@ -27,35 +27,38 @@ public class TemplateExpressionParsing extends ExpressionTestCase {
@@ -27,35 +27,38 @@ public class TemplateExpressionParsing extends ExpressionTestCase {
Expressionexpr=parser.parseExpression("The quick ${'brown'} fox jumped over the ${'lazy'} dog",DefaultTemplateParserContext.INSTANCE);
Expressionexpr=parser.parseExpression("The quick ${'brown'} fox jumped over the ${'lazy'} dog",
DefaultTemplateParserContext.INSTANCE);
Objecto=expr.getValue();
System.out.println(o);
assertEquals("The quick brown fox jumped over the lazy dog",o.toString());
assertEquals("The quick brown fox jumped over the lazy dog",o.toString());
}
// TODO need to support this case but what is the neatest way? Escapet the clasing delimiters in the expression string?
// public void testParsingTemplateExpressionThatEmbedsTheDelimiters() throws Exception {
// SpelExpressionParser parser = new SpelExpressionParser();
// Expression expr = parser.parseExpression("The quick ${{'green','brown'}.${true}} fox jumped over the ${'lazy'} dog",DefaultTemplateParserContext.INSTANCE);
// Object o = expr.getValue();
// System.out.println(o);
// assertEquals("The quick brown fox jumped over the lazy dog",o.toString());
// }
// TODO need to support this case but what is the neatest way? Escape the clashing delimiters in the expression
// string?
// public void testParsingTemplateExpressionThatEmbedsTheDelimiters() throws Exception {
// SpelExpressionParser parser = new SpelExpressionParser();
// Expression expr = parser.parseExpression("The quick ${{'green','brown'}.${true}} fox jumped over the ${'lazy'}
// dog",DefaultTemplateParserContext.INSTANCE);
// Object o = expr.getValue();
// System.out.println(o);
// assertEquals("The quick brown fox jumped over the lazy dog",o.toString());