use of org.yakindu.sct.model.sexec.StateSwitch in project statecharts by Yakindu.
the class Assert method assertStateSwitch.
public static void assertStateSwitch(Step step, ExecutionState... states) {
assertNotNull("Step is null", step);
assertTrue("Step is no StateSwitch (was " + step.getClass().getName() + ")", step instanceof StateSwitch);
List<ExecutionState> stateList = Arrays.asList(states);
List<ExecutionState> stateCases = new ArrayList<ExecutionState>();
for (StateCase aCase : ((StateSwitch) step).getCases()) {
stateCases.add(aCase.getState());
}
assertEquals("StateSwitch cases do not match!", stateList, stateCases);
}
Aggregations