Commit 29fff1d0 authored by Filip Reaboi's avatar Filip Reaboi
Browse files

added RunAsCommand()

refs 2978
parent c68f4a78
......@@ -26,6 +26,7 @@ import org.fortiss.af3.component.model.impl.CausalityComponentSpecificationImpl;
import org.fortiss.af3.component.simulator.ExecutableCompositeComponent;
import org.fortiss.af3.state.simulator.ExecutableStateAutomatonSpecification;
import org.fortiss.tooling.base.model.element.IModelElementSpecification;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.junit.Test;
import test.org.fortiss.af3.component.simulator.ComponentSimulatorTestBase;
......@@ -56,9 +57,19 @@ public class WeaklyCausal_TLC_Merge_SimulationTest extends
/** {@inheritDoc} */
@Override
protected void setupSimulator() {
setCausality(testModel.merge, false);
setCausality(testModel.controller, false);
setCausality(testModel.behavior, false);
ICommandStackService.getInstance().runAsCommand(testModel.merge, () -> {
setCausality(testModel.merge, false);
});
ICommandStackService.getInstance().runAsCommand(testModel.controller, () -> {
setCausality(testModel.controller, false);
});
ICommandStackService.getInstance().runAsCommand(testModel.behavior, () -> {
setCausality(testModel.behavior, false);
});
super.setupSimulator();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment