use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testListWithSingleElement.
@Test
public void testListWithSingleElement() throws Exception {
Expression.compileExpressions = true;
Operand o = Expression.evaluate("{'a'}", testDoc);
List<Object> res = (List<Object>) o.value;
assertEquals(1, res.size());
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testExpressionWithDocSpecWithinSelectionWithoutCompiled.
// Re-enable if I backport this to non-compiled expressions.
@Test
@Ignore
public void testExpressionWithDocSpecWithinSelectionWithoutCompiled() throws Exception {
Expression.compileExpressions = false;
Operand o = Expression.evaluate("[custom|name]", testDoc, null, topMessage, testSelection, null);
assertEquals("option1", o.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testNonAscii.
@Test
public void testNonAscii() throws Exception {
ExpressionEvaluator ee = NavajoFactory.getInstance().getExpressionEvaluator();
Operand o = ee.evaluate("'àáâãäåāăąæßçćĉċčèéêëēĕėęěĝğġģĥħìíîïĩīĭıįĵķĸĺļľŀłñńņňŋòóôöõøōŏőœŕŗřśŝşšţťŧùúûüũůūŭűųŵýÿŷźżž'+'àáâãäåāăąæßçćĉċčèéêëēĕėęěĝğġģĥħìíîïĩīĭıįĵķĸĺļľŀłñńņňŋòóôöõøōŏőœŕŗřśŝşšţťŧùúûüũůūŭűųŵýÿŷźżž'", null, null, null);
assertEquals("àáâãäåāăąæßçćĉċčèéêëēĕėęěĝğġģĥħìíîïĩīĭıįĵķĸĺļľŀłñńņňŋòóôöõøōŏőœŕŗřśŝşšţťŧùúûüũůūŭűųŵýÿŷźżžàáâãäåāăąæßçćĉċčèéêëēĕėęěĝğġģĥħìíîïĩīĭıįĵķĸĺļľŀłñńņňŋòóôöõøōŏőœŕŗřśŝşšţťŧùúûüũůūŭűųŵýÿŷźżž", o.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testEmptyTMLParam.
@Test
public void testEmptyTMLParam() throws Exception {
Expression.compileExpressions = true;
ImmutableMessage outer = ImmutableFactory.empty().with("outerint", 1, "integer");
Operand o = Expression.evaluateImmutable("[@]", null, Optional.empty(), Optional.of(outer));
ImmutableMessage s = o.immutableMessageValue();
assertEquals(outer, s);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testExpressionWithDocSpecWithinSelection.
@Test
public void testExpressionWithDocSpecWithinSelection() throws Exception {
Expression.compileExpressions = true;
Operand o = Expression.evaluate("[custom|name]", testDoc, null, topMessage, testSelection, null);
assertEquals("option1", o.value);
}
Aggregations