use of freemarker.template.SimpleScalar in project android by JetBrains.
the class FmEscapeXmlAttributeMethodTest method check.
@SuppressWarnings("rawtypes")
private void check(String s, String expected) throws TemplateModelException {
FmEscapeXmlAttributeMethod method = new FmEscapeXmlAttributeMethod();
List list = Collections.singletonList(new SimpleScalar(s));
assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
}
use of freemarker.template.SimpleScalar in project android by JetBrains.
the class FmEscapeXmlStringMethodTest method check.
@SuppressWarnings("rawtypes")
private void check(String s, String expected) throws TemplateModelException {
FmEscapeXmlStringMethod method = new FmEscapeXmlStringMethod();
List list = Collections.singletonList(new SimpleScalar(s));
assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
}
use of freemarker.template.SimpleScalar in project android by JetBrains.
the class FmTruncateStringMethodTest method check.
@SuppressWarnings("rawtypes")
private static void check(String s, int max, String expected) throws TemplateModelException {
FmTruncateStringMethod method = new FmTruncateStringMethod();
List list = Arrays.asList(new SimpleScalar(s), new SimpleNumber(max));
assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
}
Aggregations