use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testEqualsIgnoreCase.
@Test
public void testEqualsIgnoreCase() {
FunctionInterface fi = fff.getInstance(cl, "EqualsIgnoreCase");
fi.reset();
fi.insertStringOperand("apenoot");
fi.insertStringOperand("APeNOoT");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Boolean.class, o.getClass());
assertEquals("true", o.toString());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testForAll.
@Test
public void testForAll() {
FunctionInterface fi = fff.getInstance(cl, "ForAll");
fi.reset();
fi.setInMessage(createTestNavajo());
fi.insertStringOperand("/Aap");
fi.insertStringOperand("[Noot] != 20");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetWeekDayDate.
@Test
public void testGetWeekDayDate() {
FunctionInterface fi = fff.getInstance(cl, "GetWeekDayDate");
fi.reset();
fi.insertStringOperand("SUN");
fi.insertStringOperand("forward");
fi.insertDateOperand(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 testToString.
@Test
public void testToString() {
FunctionInterface fi = fff.getInstance(cl, "ToString");
fi.reset();
fi.insertStringOperand("aap");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals("aap", o.toString());
fi.reset();
fi.insertIntegerOperand(Integer.valueOf(10));
o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals("10", o.toString());
fi.reset();
fi.insertFloatOperand(Float.valueOf(10));
o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals("10.0", o.toString());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testNextMonth.
@Test
public void testNextMonth() {
FunctionInterface fi = fff.getInstance(cl, "NextMonth");
fi.reset();
fi.insertIntegerOperand(0);
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Date.class, o.getClass());
}
Aggregations