use of org.apache.olingo.commons.api.edm.provider.CsdlReturnType in project teiid by teiid.
the class TestODataQueryExecution method testFunctionReturnsPrimitive.
@Test
public void testFunctionReturnsPrimitive() throws Exception {
String query = "exec invoke(1, 'foo')";
String expectedURL = "invoke?e1=1&e2='foo'";
String response = "{\"value\":\"returnX\"}";
CsdlReturnType returnType = new CsdlReturnType();
returnType.setType("Edm.String");
MetadataFactory mf = TestODataMetadataProcessor.functionMetadata("invoke", returnType, null);
ProcedureExecution excution = helpProcedureExecute(mf, query, response, expectedURL, 200);
assertArrayEquals(new Object[] { "returnX" }, excution.getOutputParameterValues().toArray(new Object[1]));
}
Aggregations