public void testPEWithRenameConnection() throws Exception
{
ProcessingElementInputDescriptor input = new ProcessingElementInputDescriptor("expression");
ProcessingElementOutputDescriptor output = new ProcessingElementOutputDescriptor("data");
ProcessingElementDescriptor inputDescriptor =
new SimpleProcessingElementDescriptor("uk.org.ogsadai.SQLQuery",
Collections.singletonList(input),
Collections.singletonList(output));
mRegistry.registerProcessingElement(inputDescriptor, null);
DISPELGraphBuilder builder = runDISPEL(
"use uk.org.ogsadai.SQLQuery;" +
"SQLQuery sqlQuery = new SQLQuery with data as output:[<Integer i, j; Real r; String s>], expression as input;"
);
assertNull(mError);
Variable var = builder.getDispelExecutionState().getVariables().get("sqlQuery");
assertNotNull(var);
assertTrue(var.getValue() instanceof ProcessingElementNode);
ProcessingElementDescriptor descriptor =
((ProcessingElementNode)var.getValue()).getProcessingElementDescriptor();
assertNull(descriptor.getOutput("data"));
assertNotNull(descriptor.getOutput("output"));
}