use of com.dexels.navajo.document.Navajo in project navajo by Dexels.
the class StandardFunctionsTest method testEvaluateExpression.
@Test
public void testEvaluateExpression() {
DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
FunctionInterface fi = fff.getInstance(cl, "EvaluateExpression");
fi.reset();
Navajo doc = createTestNavajo();
Header h = NavajoFactory.getInstance().createHeader(doc, "aap", "noot", "mies", -1);
doc.addHeader(h);
fi.setInMessage(doc);
fi.insertStringOperand("true");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
}
use of com.dexels.navajo.document.Navajo in project navajo by Dexels.
the class StandardFunctionsTest method testGetLogoImage.
@Test
public void testGetLogoImage() {
FunctionInterface fi = fff.getInstance(cl, "GetLogoImage");
Navajo doc = createTestNavajo();
fi.setInMessage(doc);
fi.reset();
fi.insertStringOperand("Logo");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Binary.class, o.getClass());
}
use of com.dexels.navajo.document.Navajo 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.document.Navajo 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.document.Navajo 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