summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghillairet2012-05-21 10:06:10 (EDT)
committer mgolubev2012-05-21 10:06:10 (EDT)
commit030c8bbdb5560acc46dc48aa4043e9965d64ee21 (patch)
treefc3358eab79d76c85b4c6a3c0f46d9bbcdb17fb5
parent2d3453b000184d1748cef438f96b5ce8bf230a53 (diff)
downloadorg.eclipse.gmf-tooling-030c8bbdb5560acc46dc48aa4043e9965d64ee21.zip
org.eclipse.gmf-tooling-030c8bbdb5560acc46dc48aa4043e9965d64ee21.tar.gz
org.eclipse.gmf-tooling-030c8bbdb5560acc46dc48aa4043e9965d64ee21.tar.bz2
Updated tests for qvto bridge
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerTest.java4
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerVisualIDWithTraceTest.java9
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtPaletteTransformationTest.java18
3 files changed, 13 insertions, 18 deletions
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerTest.java
index 56fc245..3b0ab20 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerTest.java
@@ -70,7 +70,7 @@ public abstract class QvtGenModelTransformerTest extends AbstractMappingTransfor
ResourceSet resourceSet = genModel.eResource().getResourceSet();
traceResource = resourceSet.createResource(URI.createURI("test.qvtotrace"));
- InternalTransformationExecutor executor = //new TransformationExecutor(URI.createURI("platform:/plugin/org.eclipse.gmf.bridge/transforms/Map2Gen.qvto"));
+ InternalTransformationExecutor executor =
new InternalTransformationExecutor(URI.createURI("platform:/plugin/org.eclipse.gmf.bridge/transforms/Map2Gen.qvto")) {
@Override
protected void handleExecutionTraces(Trace traces) {
@@ -165,13 +165,11 @@ public abstract class QvtGenModelTransformerTest extends AbstractMappingTransfor
final NodeMapping nodeMapping = topNode.getChild();
GenTopLevelNode genNode = findTopNode(nodeMapping);
assertNotNull(genNode);
- System.out.println(nodeMapping.getTool().eContainer());
assertEquals(nodeMapping.getTool() != null ? 1 : 0, countUses(genNode, palette));
}
for (LinkMapping linkMapping : getMapping().getLinks()) {
GenLink genLink = find(linkMapping);
assertNotNull(genLink);
- System.out.println(linkMapping.getTool().eContainer());
assertEquals(linkMapping.getTool() != null ? 1 : 0, countUses(genLink, palette));
}
// TODO add grooping test
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerVisualIDWithTraceTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerVisualIDWithTraceTest.java
index fbf7eec..6dae6c7 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerVisualIDWithTraceTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtGenModelTransformerVisualIDWithTraceTest.java
@@ -140,17 +140,14 @@ public class QvtGenModelTransformerVisualIDWithTraceTest extends ConfiguredTestC
assertEquals(1, expNodes.size());
assertEquals(expNodes.size(), actNodes.size());
-// assertEquals(2001, expNodes.get(0).getVisualID());
+ assertEquals(2001, expNodes.get(0).getVisualID());
for (int i=0;i<expNodes.size();i++){
GenTopLevelNode expNode = expNodes.get(i);
GenTopLevelNode actNode = actNodes.get(i);
-
-// assertEquals(expNode.getVisualID(), actNode.getVisualID());
+
+ assertEquals(expNode.getVisualID(), actNode.getVisualID());
}
-
- System.out.println(java.getDispencer());
- System.out.println(qvt.getDispencer());
((StatefulVisualIdentifierDispencer) java.getDispencer()).saveState();
((StatefulVisualIdentifierDispencer) qvt.getDispencer()).saveState();
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtPaletteTransformationTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtPaletteTransformationTest.java
index b336a68..3874f79 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtPaletteTransformationTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/QvtPaletteTransformationTest.java
@@ -141,15 +141,15 @@ public class QvtPaletteTransformationTest extends QvtGenModelTransformerTest {
assertTrue("... which in turn is child of palette", group.eContainer() instanceof Palette);
}
-// public void testReferenceToolFromWrongPalette() {
-// ToolEntry te = findToolEntry(myToolFromWrongPalette);
-// assertNotNull("Present", te);
-// assertEquals("... and only once", 1, countToolEntriesWithName(myToolFromWrongPalette.getTitle()));
-// assertTrue("There's some group for mis-referenced tools...", te.eContainer() instanceof ToolGroup);
-// ToolGroup group = (ToolGroup) te.eContainer();
-// assert myGroupWithWrongTool.getTools().contains(myToolFromWrongPalette) : "just make sure we didn't forget to add one to another";
-// assertNotSame("But it's not the transformation of the original owner", myGroupWithWrongTool.getTitle(), group.getTitle());
-// }
+ public void testReferenceToolFromWrongPalette() {
+ ToolEntry te = findToolEntry(myToolFromWrongPalette);
+ assertNotNull("Present", te);
+ assertEquals("... and only once", 1, countToolEntriesWithName(myToolFromWrongPalette.getTitle()));
+ assertTrue("There's some group for mis-referenced tools...", te.eContainer() instanceof ToolGroup);
+ ToolGroup group = (ToolGroup) te.eContainer();
+ assert myGroupWithWrongTool.getTools().contains(myToolFromWrongPalette) : "just make sure we didn't forget to add one to another";
+ assertNotSame("But it's not the transformation of the original owner", myGroupWithWrongTool.getTitle(), group.getTitle());
+ }
public void testOrderPreserved() {
ToolGroup transformed = findTransformedGroup(myGroupWithOrderAndSeparators);