use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testRandom.
@Test
public void testRandom() {
FunctionInterface fi = fff.getInstance(cl, "Random");
fi.reset();
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 testNow.
@Test
public void testNow() {
FunctionInterface fi = fff.getInstance(cl, "Now");
fi.reset();
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(String.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetInitials.
@Test
public void testGetInitials() {
FunctionInterface fi = fff.getInstance(cl, "GetInitials");
Navajo doc = createTestNavajo();
fi.setInMessage(doc);
fi.reset();
fi.insertStringOperand("aap noot mies");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(String.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testStringStringFunction.
@Test
public void testStringStringFunction() {
FunctionInterface fi = fff.getInstance(cl, "StringFunction");
fi.reset();
fi.insertStringOperand("indexOf");
fi.insertStringOperand("Apenoot");
fi.insertStringOperand("n");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Integer.class, o.getClass());
fi.reset();
fi.insertStringOperand("substring");
fi.insertStringOperand("Apenoot");
fi.insertIntegerOperand(Integer.valueOf(0));
fi.insertIntegerOperand(Integer.valueOf(4));
o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(String.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testCheckFloat.
@Test
public void testCheckFloat() {
FunctionInterface fi = fff.getInstance(cl, "CheckFloat");
fi.reset();
fi.insertFloatOperand(30.0);
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Boolean.class, o.getClass());
}
Aggregations