use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testToStopwatchTime.
@Test
public void testToStopwatchTime() {
FunctionInterface fi = fff.getInstance(cl, "ToStopwatchTime");
fi.reset();
fi.insertDateOperand(new Date());
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(StopwatchTime.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetWeekDayDate2.
@Test
public void testGetWeekDayDate2() {
FunctionInterface fi = fff.getInstance(cl, "GetWeekDayDate");
fi.reset();
fi.insertStringOperand("SUN");
fi.insertStringOperand("forward");
// fi.insertOperand(new Date());
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Date.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testZipArchive.
@Test
public void testZipArchive() {
FunctionInterface fi = fff.getInstance(cl, "ZipArchive");
fi.reset();
fi.insertStringOperand("aap");
Binary actual = (Binary) fi.evaluateWithTypeChecking();
assertNull(actual);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testParseDate.
@Test
public void testParseDate() {
FunctionInterface fi = fff.getInstance(cl, "ParseDate");
fi.reset();
fi.insertStringOperand("2008-08-28");
fi.insertStringOperand("yyyy-MM-dd");
Operand o = fi.evaluateWithTypeCheckingOperand();
assertEquals(Property.DATE_PROPERTY, o.type);
assertNotNull(o.value);
assertEquals(Date.class, o.value.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testCheckInteger.
@Test
public void testCheckInteger() {
FunctionInterface fi = fff.getInstance(cl, "CheckInteger");
fi.reset();
fi.insertIntegerOperand(30);
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Boolean.class, o.getClass());
}
Aggregations