Search in sources :

Example 1 with CreateExpression

use of com.dexels.navajo.functions.CreateExpression in project navajo by Dexels.

the class StandardFunctionsTest method testCheckUniquenessExtended.

@Test
public void testCheckUniquenessExtended() throws SystemException {
    String expression = "Hallo \n Hoe is het nou?";
    CreateExpression ce = new CreateExpression();
    ce.reset();
    ce.insertStringOperand(expression);
    String result = (String) ce.evaluate();
    System.err.println("result:");
    System.err.println(result);
    Operand o = Expression.evaluate(result, null);
    System.err.println("Evaluated to: ");
    System.err.println(o.value);
    assertEquals(2, ((String) o.value).split("\n").length);
}
Also used : Operand(com.dexels.navajo.document.Operand) CapString(com.dexels.navajo.functions.CapString) CreateExpression(com.dexels.navajo.functions.CreateExpression) Test(org.junit.Test)

Aggregations

Operand (com.dexels.navajo.document.Operand)1 CapString (com.dexels.navajo.functions.CapString)1 CreateExpression (com.dexels.navajo.functions.CreateExpression)1 Test (org.junit.Test)1