ProcessingElement pe = (ProcessingElement)activity;
if ("1".equals(pe.getActivityName().toString()))
{
// test for control input values
TraversableSingleActivityInput input = pe.getInput("control");
TraversableSingleActivityOutput output =
(TraversableSingleActivityOutput)input.getConnectedOutput();
assertNotNull(output);
assertEquals(
ControlledRepeat.DEFAULT_ACTIVITY_NAME,
output.getActivity().getActivityName());
input = ((ProcessingElement)output.getActivity()).getInput("repeatedInput");
assertTrue(input.isLiteral());
assertEquals("Y", input.getDataValues()[0].toString());
input = ((ProcessingElement)output.getActivity()).getInput("input");
output = (TraversableSingleActivityOutput)input.getConnectedOutput();
assertNotNull(output);
assertEquals(
ControlledRepeat.DEFAULT_ACTIVITY_NAME,
output.getActivity().getActivityName());
input = pe.getInput("input1");
output = (TraversableSingleActivityOutput)input.getConnectedOutput();
assertNotNull(output);
assertEquals(
ControlledRepeat.DEFAULT_ACTIVITY_NAME,
output.getActivity().getActivityName());
input = ((ProcessingElement)output.getActivity()).getInput("repeatedInput");
assertTrue(input.isLiteral());
assertEquals("X", input.getDataValues()[0].toString());
input = ((ProcessingElement)output.getActivity()).getInput("input");
assertTrue(input.isLiteral());
assertEquals("1", input.getDataValues()[0].toString());
assertEquals("2", input.getDataValues()[1].toString());
input = pe.getInput("input2");
output = (TraversableSingleActivityOutput)input.getConnectedOutput();
assertNotNull(output);
assertEquals(
ControlledRepeat.DEFAULT_ACTIVITY_NAME,
output.getActivity().getActivityName());
}
}
}