use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testWait.
@Test
public void testWait() {
FunctionInterface fi = fff.getInstance(cl, "Wait");
fi.reset();
fi.insertIntegerOperand(Integer.valueOf(10));
Object o = fi.evaluateWithTypeChecking();
assertNull(o);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testIsNull.
@Test
public void testIsNull() {
FunctionInterface fi = fff.getInstance(cl, "IsNull");
fi.reset();
fi.insertOperand(Operand.NULL);
Boolean actual = (Boolean) fi.evaluateWithTypeChecking();
assertEquals(true, actual);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testDateField.
@Test
public void testDateField() {
FunctionInterface fi = fff.getInstance(cl, "DateField");
fi.reset();
fi.insertDateOperand(new Date());
fi.insertStringOperand("YEAR");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Integer.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testRandomInt.
@Test
public void testRandomInt() {
FunctionInterface fi = fff.getInstance(cl, "RandomInt");
fi.reset();
fi.insertIntegerOperand(10);
fi.insertIntegerOperand(11);
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Integer.class, o.getClass());
assertEquals("10", o.toString());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testSumExpressions.
@Test
public void testSumExpressions() {
FunctionInterface fi = fff.getInstance(cl, "SumExpressions");
Navajo doc = createTestNavajo();
fi.setInMessage(doc);
fi.reset();
fi.insertStringOperand("Aap");
fi.insertStringOperand("[Noot]+10");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Integer.class, o.getClass());
assertEquals("20", o.toString());
}
Aggregations