use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class TestCompiledStringExpression method testAddTwoStrings.
// ADD
@Test
public void testAddTwoStrings() {
Operand result = Expression.evaluate("'bla' + 'bli'", null, null, null);
assertEquals("blabli", result.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class TestCompiledStringExpression method testAddDoubleAndString.
@Test
public void testAddDoubleAndString() {
Operand result = Expression.evaluate("15.0 + 'bla'", null, null, null);
assertEquals("15.0bla", result.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testExpressionNewlineOutside.
@Test
public void testExpressionNewlineOutside() throws Exception {
ExpressionEvaluator ee = NavajoFactory.getInstance().getExpressionEvaluator();
Operand o = ee.evaluate("1\n+\n1", null, null, null);
assertEquals(2, o.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testExpressionNewline.
@Test
public void testExpressionNewline() throws Exception {
ExpressionEvaluator ee = NavajoFactory.getInstance().getExpressionEvaluator();
Operand o = ee.evaluate("'aap\nnoot'", null, null, null);
assertEquals("aap\nnoot", o.value);
}
use of com.dexels.navajo.document.Operand in project navajo by Dexels.
the class ExpressionTest method testExpressionWithinSelectionWithoutCompiled.
@Test
public void testExpressionWithinSelectionWithoutCompiled() throws Exception {
Expression.compileExpressions = false;
Operand o = Expression.evaluate("[name]", testDoc, null, topMessage, testSelection, null);
assertEquals("option1", o.value);
}
Aggregations