use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetProperty.
@Test
public void testGetProperty() {
FunctionInterface fi = fff.getInstance(cl, "GetProperty");
fi.reset();
Navajo doc = createTestNavajo();
fi.setInMessage(doc);
fi.insertMessageOperand(doc.getMessage("Single"));
fi.insertStringOperand("Selectie");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertTrue(Property.class.isInstance(o));
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testDateAdd.
@Test
public void testDateAdd() {
FunctionInterface fi = fff.getInstance(cl, "DateAdd");
fi.reset();
fi.insertDateOperand(new Date());
fi.insertIntegerOperand(2);
fi.insertStringOperand("YEAR");
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 testParseStringList.
@Test
public void testParseStringList() {
FunctionInterface fi = fff.getInstance(cl, "ParseStringList");
fi.reset();
fi.insertStringOperand("aap,noot,mies");
fi.insertStringOperand(",");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertTrue(List.class.isInstance(o));
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetUrlTime.
@Test
public void testGetUrlTime() {
FunctionInterface fi = fff.getInstance(cl, "GetUrlTime");
fi.reset();
fi.insertStringOperand("http://www.dexels.com/index.php");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testCheckEmail.
@Test
public void testCheckEmail() {
FunctionInterface fi = fff.getInstance(cl, "CheckEmail");
fi.reset();
fi.insertStringOperand("arjen@dexels.com");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Boolean.class, o.getClass());
}
Aggregations