if(colTransitions.size() == 1) {
TCGTransition oTransition = colTransitions.get(0);
// add the current transition
TestGoalTransitionSequence oTestGoal = new TestGoalTransitionSequence();
oTestGoal.getTransitionSequence().add(
new Pair<TCGNode, TCGTransition>(in_oNode, oTransition));
oRunnerState.getTestGoalsToSatisfy().add(oTestGoal);
colRunnerStates.add(oRunnerState);
// search for further transitions
if(oTransition != null)
oTargetNode = oTransition.getTargetNode();
}
colRunnerStates.addAll(
addTargetTransitionAndStateForNodeAndEventHelper(
oTargetNode, oRunnerState));
Collections.sort(colRunnerStates, new Comparator<TestCaseGeneratorRunnerState>() {
@Override
public int compare(TestCaseGeneratorRunnerState o1,
TestCaseGeneratorRunnerState o2) {
TestGoalTransitionSequence colTransitions1 =
(TestGoalTransitionSequence)o1.getTestGoalsToSatisfy().get(0);
TestGoalTransitionSequence colTransitions2 =
(TestGoalTransitionSequence)o2.getTestGoalsToSatisfy().get(0);
Integer o1Length = colTransitions1.getTransitionSequence().size();
Integer o2Length = colTransitions2.getTransitionSequence().size();
return o2Length.compareTo(o1Length);
}
});
}