Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java27
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java23
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java50
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java24
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java28
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java8
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java8
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java11
16 files changed, 100 insertions, 110 deletions
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java
index 600b4cccaf3..342ceb4d0ed 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java
@@ -189,7 +189,14 @@ public class AbstractLinkPrepareTest extends AbstractTest {
// Prepare child nodes
-
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
// Port & FlowPorts no distinction made on FlowPorts kind...
portOnBlockSourceView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, container);
@@ -198,36 +205,22 @@ public class AbstractLinkPrepareTest extends AbstractTest {
portOnPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partContainer2);
portOnNestedPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer1_1);
portOnNestedPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer2_1);
- portOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1);
+ portOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1SourceView);
portOnSubNestedPartContainer2_1_1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer2_1_1);
portOnSubNestedPartContainer1_2_1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_2_1);
portOnSubNestedPartContainer1_1_2TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_1_2);
-
-
flowportOnBlockSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
flowportOnBlockTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
flowportOnPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer1);
flowportOnPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer2);
flowportOnNestedPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer1_1);
flowportOnNestedPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer2_1);
- flowportOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1);
+ flowportOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1SourceView);
flowportOnSubNestedPartContainer2_1_1TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer2_1_1);
flowportOnSubNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_2_1);
flowportOnSubNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_1_2);
-
-
- partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
- partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
- nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
- nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
- subNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
- subNestedPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
- subNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
- subNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
-
-
propertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
propertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
nestedPropertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java
index e51dd475043..f44ccbdc398 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromActorPart extends AbstractLinkCreation
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java
index 7f9eb6564f4..31580e444d0 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java
@@ -94,8 +94,8 @@ public class TestLinkCreationConnectorFromFlowPortOnBlock extends AbstractLinkCr
expectedTargetNestedPath.put(view, emptyPath);
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
index 109a9233731..1cd76d1fa22 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
@@ -82,7 +82,8 @@ public class TestLinkCreationConnectorFromFlowPortOnNestedPart extends AbstractL
Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
- List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+// List<Property> deepNestedPath = Arrays.asList(new Property[] {part1, nestedPartContainer1_1Property, nestedPartContainer2_1Property});
List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
List<Property> emptyPath = Collections.emptyList();
@@ -97,19 +98,19 @@ public class TestLinkCreationConnectorFromFlowPortOnNestedPart extends AbstractL
}
expectedSourceNestedPath.put(blockTargetView, nestedPath);
- expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
- expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
- expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, emptyPath);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
- expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
- expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
- expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
- expectedSourceNestedPath.put(partTargetView, nestedPath);
- expectedSourceNestedPath.put(propertyTargetView, nestedPath);
- expectedSourceNestedPath.put(referenceTargetView, nestedPath);
- expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java
index 069ad0d3cc1..378b1ae0228 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java
@@ -39,87 +39,73 @@ public class TestLinkCreationConnectorFromFlowPortOnSubNestedPart extends Abstra
@BeforeClass
public static void initExpectedResults() throws Exception {
-
// Initialize source creation results
isCreationAllowed = new HashMap<View, Boolean>();
-
isCreationAllowed.put(blockTargetView, false);
-
isCreationAllowed.put(actorPartTargetView, true);
isCreationAllowed.put(nestedActorPartTargetView, true);
-
isCreationAllowed.put(portOnBlockTargetView, true);
isCreationAllowed.put(portOnPartTargetView, true);
isCreationAllowed.put(portOnNestedPartTargetView, true);
-
isCreationAllowed.put(flowportOnBlockTargetView, true);
isCreationAllowed.put(flowportOnPartTargetView, true);
isCreationAllowed.put(flowportOnNestedPartTargetView, true);
-
isCreationAllowed.put(partTargetView, true);
isCreationAllowed.put(nestedPartTargetView, true);
isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
-
isCreationAllowed.put(propertyTargetView, true);
isCreationAllowed.put(nestedPropertyTargetView, true);
-
isCreationAllowed.put(referenceTargetView, true);
isCreationAllowed.put(nestedReferenceTargetView, true);
-
isCreationAllowed.put(valueTargetView, true);
isCreationAllowed.put(nestedValueTargetView, true);
-
isCreationAllowed.put(commentTargetView, false);
isCreationAllowed.put(commentCNTargetView, false);
isCreationAllowed.put(constraintTargetView, false);
isCreationAllowed.put(constraintCNTargetView, false);
-
+
// Initialize nested property path for tests
Property part = (Property)partContainer1.getElement();
Property part2 = (Property)partContainer2.getElement();
Property nestedPart = (Property)nestedPartContainer1_1.getElement();
+ Property subNestedPart = (Property)subNestedPartContainer1_1_1SourceView.getElement();
Property nestedPart1_2 = (Property)nestedPartContainer1_2.getElement();
Property nestedPart2_1 = (Property)nestedPartContainer2_1.getElement();
- List<Property> subNestedPath = Arrays.asList(new Property[] {part, nestedPart});
- List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart });
- List<Property> nestedContainer1_2Path = Arrays.asList(new Property[]{ part2, nestedPart1_2 });
+ List<Property> subNestedPath = Arrays.asList(new Property[]{ part, nestedPart, });
+ List<Property> deepNestedPath = Arrays.asList(new Property[]{ part, nestedPart, subNestedPart });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart, subNestedPart });
+ List<Property> nestedContainer1_2Path = Arrays.asList(new Property[]{ part2, nestedPart1_2 });
List<Property> nestedContainer2_1Path = Arrays.asList(new Property[]{ nestedPart2_1 });
List<Property> emptyPath = Collections.emptyList();
-
+
expectedSourceNestedPath = new HashMap<View, List<Property>>();
expectedTargetNestedPath = new HashMap<View, List<Property>>();
-
for(View view : isCreationAllowed.keySet()) {
expectedSourceNestedPath.put(view, emptyPath);
expectedTargetNestedPath.put(view, emptyPath);
}
-
expectedSourceNestedPath.put(blockTargetView, subNestedPath);
- expectedSourceNestedPath.put(actorPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath);
- expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath);
- expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(partTargetView, subNestedPath);
- expectedSourceNestedPath.put(propertyTargetView, subNestedPath);
- expectedSourceNestedPath.put(referenceTargetView, subNestedPath);
- expectedSourceNestedPath.put(valueTargetView, subNestedPath);
-
+ expectedSourceNestedPath.put(actorPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(partTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(valueTargetView, deepNestedPath);
expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
-
expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
-
- expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, deepNestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedContainer1_2Path);
- expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, Arrays.asList(nestedPart));
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedContainer2_1Path);
}
-
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
index f01efc49489..a97e6a7fe29 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromPart extends AbstractLinkCreationFromE
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java
index a6ffe47cd01..c69fa68fa83 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromPortOnBlock extends AbstractLinkCreati
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java
index c87020658c8..b7b32e018fe 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java
@@ -82,7 +82,7 @@ public class TestLinkCreationConnectorFromPortOnNestedPart extends AbstractLinkC
Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
- List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
List<Property> emptyPath = Collections.emptyList();
@@ -96,20 +96,20 @@ public class TestLinkCreationConnectorFromPortOnNestedPart extends AbstractLinkC
expectedTargetNestedPath.put(view, emptyPath);
}
- expectedSourceNestedPath.put(blockTargetView, nestedPath);
- expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
- expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
- expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, emptyPath);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
- expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
- expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
- expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
- expectedSourceNestedPath.put(partTargetView, nestedPath);
- expectedSourceNestedPath.put(propertyTargetView, nestedPath);
- expectedSourceNestedPath.put(referenceTargetView, nestedPath);
- expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
}
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java
index 7434245d5db..27a2a6ecac8 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java
@@ -80,10 +80,12 @@ public class TestLinkCreationConnectorFromPortOnSubNestedPart extends AbstractLi
Property part = (Property)partContainer1.getElement();
Property part2 = (Property)partContainer2.getElement();
Property nestedPart = (Property)nestedPartContainer1_1.getElement();
+ Property subNestedPart = (Property)subNestedPartContainer1_1_1SourceView.getElement();
Property nestedPart1_2 = (Property)nestedPartContainer1_2.getElement();
Property nestedPart2_1 = (Property)nestedPartContainer2_1.getElement();
- List<Property> subNestedPath = Arrays.asList(new Property[] {part, nestedPart});
- List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart });
+ List<Property> subNestedPath = Arrays.asList(new Property[] {part, nestedPart, });
+ List<Property> deepNestedPath = Arrays.asList(new Property[] {part, nestedPart, subNestedPart});
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart, subNestedPart});
List<Property> nestedContainer1_2Path = Arrays.asList(new Property[]{ part2, nestedPart1_2 });
List<Property> nestedContainer2_1Path = Arrays.asList(new Property[]{ nestedPart2_1 });
List<Property> emptyPath = Collections.emptyList();
@@ -97,15 +99,15 @@ public class TestLinkCreationConnectorFromPortOnSubNestedPart extends AbstractLi
}
expectedSourceNestedPath.put(blockTargetView, subNestedPath);
- expectedSourceNestedPath.put(actorPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath);
- expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath);
- expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath);
- expectedSourceNestedPath.put(partTargetView, subNestedPath);
- expectedSourceNestedPath.put(propertyTargetView, subNestedPath);
- expectedSourceNestedPath.put(referenceTargetView, subNestedPath);
- expectedSourceNestedPath.put(valueTargetView, subNestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(partTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(valueTargetView, deepNestedPath);
expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
@@ -116,9 +118,9 @@ public class TestLinkCreationConnectorFromPortOnSubNestedPart extends AbstractLi
expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
- expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, deepNestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedContainer1_2Path);
- expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, Arrays.asList(nestedPart));
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedContainer2_1Path);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java
index ed7944918a9..86a82bf4bdd 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromProperty extends AbstractLinkCreationF
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
index 1894dc3747c..ceb2e904420 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromReference extends AbstractLinkCreation
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
index db5d25182b6..9bf00d2bafd 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
@@ -97,8 +97,8 @@ public class TestLinkCreationConnectorFromValue extends AbstractLinkCreationFrom
}
expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedTargetNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedTargetNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java
index 6742dfad36f..62f3c65b785 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java
@@ -17,6 +17,7 @@ import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.Editor
import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -61,6 +62,9 @@ public class TestLinkReorientSourceConnector extends AbstractLinkReorientSourceC
Property part = (Property) partContainer1.getElement();
List<Property> nestedPath = new ArrayList<Property>();
nestedPath.add(part);
+
+ Property nestedPart = (Property)nestedPartContainer1.getElement();
+ List<Property> deepNestedPath = Arrays.asList(part, nestedPart);
// Initialize source creation results
isReorientAllowed = new HashMap<View, Boolean>();
@@ -104,8 +108,8 @@ public class TestLinkReorientSourceConnector extends AbstractLinkReorientSourceC
}
expectedNestedPath.put(nestedActorPartSourceView, nestedPath);
- expectedNestedPath.put(portOnNestedPartSourceView, nestedPath);
- expectedNestedPath.put(flowportOnNestedPartSourceView, nestedPath);
+ expectedNestedPath.put(portOnNestedPartSourceView, deepNestedPath);
+ expectedNestedPath.put(flowportOnNestedPartSourceView, deepNestedPath);
expectedNestedPath.put(nestedPartSourceView, nestedPath);
expectedNestedPath.put(nestedPropertySourceView, nestedPath);
expectedNestedPath.put(nestedReferenceSourceView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java
index 6063f5f9f5f..232d9a0e109 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java
@@ -17,6 +17,7 @@ import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.Editor
import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -62,6 +63,9 @@ public class TestLinkReorientTargetConnector extends AbstractLinkReorientTargetC
List<Property> nestedPath = new ArrayList<Property>();
nestedPath.add(part);
+ Property nestedPart = (Property)nestedPartContainer2.getElement();
+ List<Property> deepNestedPath = Arrays.asList(part, nestedPart);
+
// Initialize source creation results
isReorientAllowed = new HashMap<View, Boolean>();
@@ -104,8 +108,8 @@ public class TestLinkReorientTargetConnector extends AbstractLinkReorientTargetC
}
expectedNestedPath.put(nestedActorPartTargetView, nestedPath);
- expectedNestedPath.put(portOnNestedPartTargetView, nestedPath);
- expectedNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedNestedPath.put(portOnNestedPartTargetView, deepNestedPath);
+ expectedNestedPath.put(flowportOnNestedPartTargetView, deepNestedPath);
expectedNestedPath.put(nestedPartTargetView, nestedPath);
expectedNestedPath.put(nestedPropertyTargetView, nestedPath);
expectedNestedPath.put(nestedReferenceTargetView, nestedPath);
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java
index 39b1a934263..0ffb8d52678 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java
@@ -19,7 +19,7 @@ import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.Editor
import java.util.ArrayList;
import java.util.Collection;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
@@ -219,6 +219,7 @@ public class TestPrepareUtils {
// Add view
ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ Assert.assertTrue("Command should be executable", createViewCommand.canExecute());
EditorUtils.getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
index d29d2468998..e8f8220e9dd 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
@@ -23,12 +23,11 @@ import static org.junit.Assert.fail;
import java.lang.reflect.Field;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import junit.framework.Assert;
-
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.commands.operations.IOperationHistory;
import org.eclipse.core.commands.operations.IOperationHistoryListener;
@@ -86,6 +85,7 @@ import org.eclipse.uml2.uml.ConnectorEnd;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Assert;
public class TestUtils {
@@ -213,6 +213,7 @@ public class TestUtils {
defaultExecutionTest(command);
// Test the results then
// fail("Result tests not implemented.");
+ EditorUtils.getCommandStack().undo();
} else {
fail("The expected kind of command was {" + expectedCommandNames.get(0) + "}, but was {" + command.getLabel() + "}");
}
@@ -239,7 +240,7 @@ public class TestUtils {
// Ok the command can be executed.
defaultExecutionTest(subCommand);
// Add one more undo to go back in initial state before testing next command
- EditorUtils.getDiagramCommandStack().undo();
+ EditorUtils.getCommandStack().undo();;
// Test the results then
// fail("Result tests not implemented.");
} else {
@@ -525,9 +526,7 @@ public class TestUtils {
Assert.assertNull("No nested connector end stereotype should be applied.", nestedConnectorEnd);
} else {
Assert.assertNotNull("Nested connector end stereotype should be applied.", nestedConnectorEnd);
- if(!nestedConnectorEnd.getPropertyPath().equals(nestedPath)) {
- fail("The nested property path is incorrect.");
- }
+ Assert.assertEquals("Invalid nested path", nestedPath, nestedConnectorEnd.getPropertyPath());
}
}

Back to the top