use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testGetSelectedName.
@Test
public void testGetSelectedName() {
FunctionInterface fi = fff.getInstance(cl, "GetSelectedName");
fi.reset();
Navajo doc = createTestNavajo();
fi.insertSelectionListOperand(doc.getProperty("/Single/Selectie").getAllSelectedSelections());
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals("key", o.toString());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testSumProperties.
@Test
public void testSumProperties() {
FunctionInterface fi = fff.getInstance(cl, "SumProperties");
fi.setInMessage(createTestNavajo());
fi.reset();
fi.insertStringOperand("Aap");
fi.insertStringOperand("Noot");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Integer.class, o.getClass());
assertEquals("10", o.toString());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testToBinaryFromUrl.
@Test
public void testToBinaryFromUrl() {
FunctionInterface fi = fff.getInstance(cl, "ToBinaryFromUrl");
fi.reset();
fi.insertStringOperand("http://www.google.com/google.jpg");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertEquals(Binary.class, o.getClass());
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testFile.
@Test
public void testFile() {
FunctionInterface fi = fff.getInstance(cl, "File");
fi.reset();
fi.insertStringOperand("aap");
Object o = fi.evaluateWithTypeChecking();
assertNull(o);
}
use of com.dexels.navajo.expression.api.FunctionInterface in project navajo by Dexels.
the class StandardFunctionsTest method testParseSelection.
@Test
public void testParseSelection() {
FunctionInterface fi = fff.getInstance(cl, "ParseSelection");
fi.reset();
fi.insertStringOperand("aap,noot,mies");
Object o = fi.evaluateWithTypeChecking();
assertNotNull(o);
assertTrue(o.getClass().isArray());
}
Aggregations