Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-06-12 13:49:22 +0000
committercletavernie2012-06-12 13:49:22 +0000
commitaf05ace5c7166b28f60dfa1ecb4447e94a6a4c0d (patch)
tree543c91c86e08ba6691212037c916838af365b9d0 /tests/junit/plugins/sysml
parentf5a184715b96dfee1159cf44fefc2b3e7de25cf4 (diff)
downloadorg.eclipse.papyrus-af05ace5c7166b28f60dfa1ecb4447e94a6a4c0d.tar.gz
org.eclipse.papyrus-af05ace5c7166b28f60dfa1ecb4447e94a6a4c0d.tar.xz
org.eclipse.papyrus-af05ace5c7166b28f60dfa1ecb4447e94a6a4c0d.zip
370819: [Global] A Flexible Drag & Drop framework
https://bugs.eclipse.org/bugs/show_bug.cgi?id=370819 Update SysML Tests so that they don't fail when dropping a Classifier on an Instance Specification (Which is now allowed)
Diffstat (limited to 'tests/junit/plugins/sysml')
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java28
6 files changed, 108 insertions, 60 deletions
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java
index 19fce7418e2..2c0e3ef78a9 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java
@@ -30,6 +30,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on DataType.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnDimension extends AbstractTest {
public static View containerView;
@@ -49,7 +57,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -62,7 +70,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -79,7 +87,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -98,7 +106,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -110,7 +118,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -137,7 +145,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -149,7 +157,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -188,7 +196,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -215,7 +223,7 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -241,6 +249,6 @@ public class TestNodeDropOnDimension extends AbstractTest {
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java
index 00e1e868839..a6afdad2789 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java
@@ -30,6 +30,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on Unit.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnUnit extends AbstractTest {
public static View containerView;
@@ -49,7 +57,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -62,7 +70,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -79,7 +87,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -98,7 +106,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -110,7 +118,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -137,7 +145,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -149,7 +157,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -188,7 +196,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -215,7 +223,7 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -241,6 +249,6 @@ public class TestNodeDropOnUnit extends AbstractTest {
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java
index 6efe9ed7471..383b5f70b77 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java
@@ -30,6 +30,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on InstanceSpecification.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnInstanceSpecification extends AbstractTest {
public static View containerView;
@@ -49,7 +57,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -62,7 +70,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -74,7 +82,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -93,7 +101,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -105,7 +113,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -132,7 +140,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -144,7 +152,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -183,7 +191,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -210,7 +218,7 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -236,6 +244,6 @@ public class TestNodeDropOnInstanceSpecification extends AbstractTest {
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java
index a7598a18ba8..261d1bf2081 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java
@@ -30,6 +30,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on InstanceSpecification Child node.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
public static View containerView;
@@ -49,7 +57,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -62,7 +70,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -74,7 +82,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -93,7 +101,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -105,7 +113,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -132,7 +140,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -144,7 +152,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -183,7 +191,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -210,7 +218,7 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -236,6 +244,6 @@ public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java
index a8c843c4c93..1764c2fbe95 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java
@@ -31,6 +31,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on InstanceSpecification Compartment.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest {
public static View containerView;
@@ -51,7 +59,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -64,7 +72,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -76,7 +84,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -95,7 +103,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -107,7 +115,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -134,7 +142,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -146,7 +154,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -185,7 +193,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -212,7 +220,7 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -244,6 +252,6 @@ public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java
index bdf49487694..b7b333b5ce6 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java
@@ -31,6 +31,14 @@ import org.junit.Test;
/**
* JUnit tests for element Drop test (via palette tools) on InstanceSpecification Compartment.
*/
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTest {
public static View containerView;
@@ -51,7 +59,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropActor() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -64,7 +72,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -76,7 +84,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropConstraintBlock() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -95,7 +103,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropDataType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -107,7 +115,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropEnumeration() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -134,7 +142,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropFlowSpecification() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -146,7 +154,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropInterface() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -185,7 +193,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropPrimitiveType() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -212,7 +220,7 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropSignal() throws Exception {
EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
@Test
@@ -244,6 +252,6 @@ public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTe
@Test
public void testDropValueType() throws Exception {
EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
- dropFromModelExplorer(droppedElement, containerView, false);
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
}
}

Back to the top