use of org.yakindu.sct.model.sexec.ExecutionState 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);
}
use of org.yakindu.sct.model.sexec.ExecutionState in project statecharts by Yakindu.
the class ExitStateImpl method setState.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setState(ExecutionState newState) {
ExecutionState oldState = state;
state = newState;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.EXIT_STATE__STATE, oldState, state));
}
Aggregations