diff options
author | Claude Brisson <cbrisson@apache.org> | 2018-10-17 19:18:37 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2018-10-17 19:18:37 +0000 |
commit | b59622f4ea460630091fd731bbd4b10cb355a18b (patch) | |
tree | 91de50771b3616e30b8d3dfd0fe8b52e532e86d4 /velocity-engine-core/src/test | |
parent | 087f6f6b200664a12e3748eccdae1489d6709787 (diff) | |
download | apache-velocity-engine-b59622f4ea460630091fd731bbd4b10cb355a18b.tar.gz |
[VELOCITY-892] Better handling of methods disambiguisation
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/branches/VELOCITY-892@1844155 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src/test')
-rw-r--r-- | velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java index 87ec9995..23ee585a 100644 --- a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java +++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java @@ -19,6 +19,7 @@ package org.apache.velocity.test.util.introspection; import junit.framework.TestSuite; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.TypeUtils; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; @@ -198,6 +199,15 @@ public class ConversionHandlerTestCase extends BaseTestCase } } + public void testOtherConversions() throws Exception + { + VelocityEngine ve = createEngine(false); + VelocityContext context = createContext(); + StringWriter writer = new StringWriter(); + ve.evaluate(context, writer,"test", "$strings.join(['foo', 'bar'], ',')"); + assertEquals("foo,bar", writer.toString()); + } + /** * Return and initialize engine * @return @@ -287,6 +297,7 @@ public class ConversionHandlerTestCase extends BaseTestCase }; context.put("types", types); context.put("introspect", new Introspect()); + context.put("strings", new StringUtils()); return context; } |