use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testNavajoRequestToString.
@Test
public void testNavajoRequestToString() {
FunctionInterface fi = fff.getInstance(cl, "NavajoRequestToString");
fi.reset();
Navajo n = createTestNavajo();
fi.setInMessage(n);
Object o = fi.evaluate();
assertTrue(((String) o).indexOf("Aap") != -1);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testSetAllProperties.
@Test
public void testSetAllProperties() {
FunctionInterface fi = fff.getInstance(cl, "SetAllProperties");
fi.reset();
fi.setInMessage(createTestNavajo());
fi.insertMessageOperand(createTestNavajo().getMessage("Aap"));
fi.insertStringOperand("Noot");
fi.insertIntegerOperand(Integer.valueOf(2));
Object o = fi.evaluateWithTypeChecking();
assertNull(o);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testToClockTime.
@Test
public void testToClockTime() {
FunctionInterface fi = fff.getInstance(cl, "ToClockTime");
fi.reset();
fi.insertStringOperand("10:00");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals("10:00:00", o.toString());
assertEquals(ClockTime.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testCheckUniqueness.
@Test
public void testCheckUniqueness() {
FunctionInterface fi = fff.getInstance(cl, "CheckUniqueness");
fi.reset();
fi.setInMessage(createTestNavajo());
fi.insertStringOperand("Aap");
fi.insertStringOperand("Noot");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Boolean.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetMessage.
@Test
public void testGetMessage() {
FunctionInterface fi = fff.getInstance(cl, "GetMessage");
fi.reset();
Navajo doc = createTestNavajo();
fi.setInMessage(doc);
fi.insertMessageOperand(doc.getMessage("Aap"));
fi.insertIntegerOperand(0);
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
}
Aggregations