use of org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.InitializingWithoutDefaultTSC in project statecharts by Yakindu.
the class ModelSequencerSCTest method testSCInitSequence_VariablesWithoutDefaults.
/**
* The init sequence must contain variable initialization for variables without default value.
*/
@Test
public void testSCInitSequence_VariablesWithoutDefaults() {
InitializingWithoutDefaultTSC tsc = new InitializingWithoutDefaultTSC();
ExecutionFlow flow = sequencer.transform(tsc.sc);
assertNotNull(flow.getInitSequence());
assertEquals(4, flow.getInitSequence().getSteps().size());
assertAssignment(flow.getInitSequence(), 0, "b", AssignmentOperator.ASSIGN, "false");
assertAssignment(flow.getInitSequence(), 1, "i", AssignmentOperator.ASSIGN, "0");
assertAssignment(flow.getInitSequence(), 2, "r", AssignmentOperator.ASSIGN, "0.0");
assertAssignment(flow.getInitSequence(), 3, "s", AssignmentOperator.ASSIGN, "");
}
Aggregations