use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.InitializedVariable.InputConstant in project kie-wb-common by kiegroup.
the class InitializedVariableTest method urlDecodeConstants.
@Test
public void urlDecodeConstants() throws UnsupportedEncodingException {
String expected = "<<<#!!!#>>>";
String encoded = URLEncoder.encode(expected, "UTF-8");
VariableDeclaration variable = new VariableDeclaration("PARENT_ID", "Object");
InputConstant c = (InputConstant) createCustomInput("PARENT", variable, encoded);
Assignment assignment = c.getDataInputAssociation().getAssignment().get(0);
FormalExpression to = (FormalExpression) assignment.getTo();
assertEquals(Ids.dataInput("PARENT", "PARENT_ID"), to.getBody());
FormalExpression from = (FormalExpression) assignment.getFrom();
assertEquals(asCData(expected), from.getBody());
}
Aggregations