Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorytanguy2011-07-01 09:12:05 +0000
committerytanguy2011-07-01 09:12:05 +0000
commit829a0a1947ef0353b5180dab7df5b31231cab1c6 (patch)
tree8ccc3f897c8f93287c73a64a0cc2312bfeaff70c /tests
parent73418c57d14b46c68c60224fda27629f7c4fb3d6 (diff)
downloadorg.eclipse.papyrus-829a0a1947ef0353b5180dab7df5b31231cab1c6.tar.gz
org.eclipse.papyrus-829a0a1947ef0353b5180dab7df5b31231cab1c6.tar.xz
org.eclipse.papyrus-829a0a1947ef0353b5180dab7df5b31231cab1c6.zip
NEW - bug 349792: [SysML Block Definition Diagram] JUnit tests for the Block Definition Diagram
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349792
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java4
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java4
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java3
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java
index 1a669f7c45e..4e842993f98 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java
@@ -162,7 +162,9 @@ public class TestNodeCreationOnInstanceSpecification extends AbstractTest {
@Test
public void createSlot() throws Exception {
- createFromPalette("blockdefinition.tool.slot", containerView, false);
+ // Current implementation re-target the command creation to the compartment
+ // (when visible which is the case in default creation)
+ createFromPalette("blockdefinition.tool.slot", containerView, true);
}
@Test
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java
index b9fa73189ce..f61cbbc7466 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java
@@ -171,7 +171,9 @@ public class TestNodeCreationOnInstanceSpecificationCN extends AbstractTest {
@Test
public void createSlot() throws Exception {
- createFromPalette("blockdefinition.tool.slot", containerView, false);
+ // Current implementation re-target the command creation to the compartment
+ // (when visible which is the case in default creation)
+ createFromPalette("blockdefinition.tool.slot", containerView, true);
}
@Test
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java
index 5a127ef2069..afd0f1ed7c0 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java
@@ -90,6 +90,9 @@ public class EditorUtils {
if(tool instanceof AspectUnspecifiedTypeCreationTool) {
AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool)tool;
+ // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
+ creationTool.setViewer(getDiagramEditor().getDiagramGraphicalViewer());
+
return creationTool.createCreateRequest();
} else if(tool instanceof AspectUnspecifiedTypeConnectionTool) {

Back to the top