Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2017-08-03 09:20:55 -0400
committerJuergen Haug2017-08-03 09:20:55 -0400
commit272882f22ce5ab6e2911cd9ff3120515f011b261 (patch)
tree6f6dce0e329c0806a490e994832dfcdc911d8731
parentc2da0247f57f694e6cf468f25fc55d2c99c1bf1f (diff)
downloadorg.eclipse.etrice-272882f22ce5ab6e2911cd9ff3120515f011b261.tar.gz
org.eclipse.etrice-272882f22ce5ab6e2911cd9ff3120515f011b261.tar.xz
org.eclipse.etrice-272882f22ce5ab6e2911cd9ff3120515f011b261.zip
[genmodel.tests] added missing file
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java37
1 files changed, 31 insertions, 6 deletions
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java
index f3dff689d..41080f8eb 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java
@@ -15,6 +15,7 @@ import java.util.Iterator;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
import org.eclipse.etrice.core.genmodel.fsm.FsmGenChecker;
import org.eclipse.etrice.core.genmodel.fsm.FsmGenExtensions;
@@ -120,10 +121,34 @@ public class TestHierInheritedFSM extends FsmGenTestBase {
}
@Test
- public void testStateGraphNode() {
+ public void testOriginRefs() {
Graph _graph = this.gc.getGraph();
- EList<Link> _links = _graph.getLinks();
- final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ EList<Node> _nodes = _graph.getNodes();
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ String _name = _stateGraphNode.getName();
+ return Boolean.valueOf(Objects.equal(_name, "state0"));
+ }
+ };
+ Iterable<Node> _filter = IterableExtensions.<Node>filter(_nodes, _function);
+ final Procedure1<Iterable<Node>> _function_1 = new Procedure1<Iterable<Node>>() {
+ @Override
+ public void apply(final Iterable<Node> it) {
+ int _size = IterableExtensions.size(it);
+ Assert.assertEquals(1, _size);
+ Node _head = IterableExtensions.<Node>head(it);
+ StateGraphNode _stateGraphNode = _head.getStateGraphNode();
+ URI _uRI = EcoreUtil.getURI(_stateGraphNode);
+ String _fragment = _uRI.fragment();
+ Assert.assertEquals("RefinedState:TestActor2$state0", _fragment);
+ }
+ };
+ ObjectExtensions.<Iterable<Node>>operator_doubleArrow(_filter, _function_1);
+ Graph _graph_1 = this.gc.getGraph();
+ EList<Link> _links = _graph_1.getLinks();
+ final Function1<Link, Boolean> _function_2 = new Function1<Link, Boolean>() {
@Override
public Boolean apply(final Link it) {
TransitionBase _transition = it.getTransition();
@@ -131,8 +156,8 @@ public class TestHierInheritedFSM extends FsmGenTestBase {
return Boolean.valueOf(Objects.equal(_name, "tr3"));
}
};
- Iterable<Link> _filter = IterableExtensions.<Link>filter(_links, _function);
- final Procedure1<Iterable<Link>> _function_1 = new Procedure1<Iterable<Link>>() {
+ Iterable<Link> _filter_1 = IterableExtensions.<Link>filter(_links, _function_2);
+ final Procedure1<Iterable<Link>> _function_3 = new Procedure1<Iterable<Link>>() {
@Override
public void apply(final Iterable<Link> it) {
int _size = IterableExtensions.size(it);
@@ -144,6 +169,6 @@ public class TestHierInheritedFSM extends FsmGenTestBase {
Assert.assertEquals("RefinedTransition:TestActor2$tr3", _fragment);
}
};
- ObjectExtensions.<Iterable<Link>>operator_doubleArrow(_filter, _function_1);
+ ObjectExtensions.<Iterable<Link>>operator_doubleArrow(_filter_1, _function_3);
}
}

Back to the top