Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2014-01-30 13:10:48 +0000
committervlorenzo2014-01-30 15:22:01 +0000
commitb8d899e900edb81462d0c8219a6e7eaa8e3ecdf1 (patch)
tree6731f08266b7f02f57b94e69b1c4e45f5ac17e78 /tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java
parent5411841afb08ecc247c58d5681ff3c7c112193a8 (diff)
downloadorg.eclipse.papyrus-b8d899e900edb81462d0c8219a6e7eaa8e3ecdf1.tar.gz
org.eclipse.papyrus-b8d899e900edb81462d0c8219a6e7eaa8e3ecdf1.tar.xz
org.eclipse.papyrus-b8d899e900edb81462d0c8219a6e7eaa8e3ecdf1.zip
Bug 418586 - [Connector] [UML] [SysML] [CompositeStructureDiagram]
Problems with UML/SysML Connector Allow connector : - on the same port - between ports of the same part - between ports of the same Block Change-Id: If0e0391d10e8a15ff15471a30d87f60927bebf35 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java')
-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/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java294
1 files changed, 155 insertions, 139 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/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.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/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java
index 581d4b8a395..bc3df808ce7 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/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.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/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java
@@ -1,139 +1,155 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
-
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeConnectorAndTestDelegateFromPalette;
-
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.junit.Test;
-
-/**
- * JUnit abstract tests for Link creation test (via palette tools).
- */
-public class AbstractConnectorCreationAndTestDelegateFromElementTest extends AbstractConnectorCreationAndTestDelegatePrepareTest {
-
- public static String toolID;
-
- public static View sourceView;
-
- public static Map<View, ConnectableElement> expectedSourcePartWithPort;
-
- public static Map<View, ConnectableElement> expectedTargetPartWithPort;
-
- @Test
- public void createLinkWithSourceBlock() throws Exception {
- View targetView = blockTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceActorPart() throws Exception {
- View targetView = actorPart2_BlockTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceNestedActorPart() throws Exception {
- View targetView = actorPart2_p1TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourcePortOnBlock() throws Exception {
- View targetView = portOnBlockTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourcePortOnPart() throws Exception {
- View targetView = port1_Part2TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourcePortOnNestedPart() throws Exception {
- View targetView = port2OnNestedPart2_Part1TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceFlowPortOnBlock() throws Exception {
- View targetView = flowportOnBlockTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceFlowPortOnPart() throws Exception {
- View targetView = flowport1_Part2TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceFlowPortOnNestedPart() throws Exception {
- View targetView = flowport1_NestedPart2_Part1TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourcePart() throws Exception {
- View targetView = partTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceNestedPart() throws Exception {
- View targetView = nestedPart2_Part1TargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceProperty() throws Exception {
- View targetView = propertyTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceNestedProperty() throws Exception {
- View targetView = nestedPropertyTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceReference() throws Exception {
- View targetView = referenceTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceNestedReference() throws Exception {
- View targetView = nestedReferenceTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceValue() throws Exception {
- View targetView = valueTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
- @Test
- public void createLinkWithSourceNestedValue() throws Exception {
- View targetView = nestedValueTargetView;
- createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeConnectorAndTestDelegateFromPalette;
+
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractConnectorCreationAndTestDelegateFromElementTest extends AbstractConnectorCreationAndTestDelegatePrepareTest {
+
+ public static String toolID;
+
+ public static View sourceView;
+
+ public static Map<View, ConnectableElement> expectedSourcePartWithPort;
+
+ public static Map<View, ConnectableElement> expectedTargetPartWithPort;
+
+ // FIXME : wrong name in all methods => replace Source by Target
+ // BMA : ne passe pas là
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View targetView = blockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceActorPart() throws Exception {
+ View targetView = actorPart2_BlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedActorPart() throws Exception {
+ View targetView = actorPart2_p1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnBlock() throws Exception {
+ View targetView = portOnBlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ // BMA : ne passe pas là
+ @Test
+ public void createLinkWithTargetPort2OnPart1() throws Exception {
+ View targetView = port2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ // BMA : ne passe pas là
+ @Test
+ public void createLinkWithTargetPort1OnPart1() throws Exception {
+ View targetView = port1_Part1SourceView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnPart() throws Exception {
+ View targetView = port1_Part2TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnNestedPart() throws Exception {
+ View targetView = port2OnNestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnBlock() throws Exception {
+ View targetView = flowportOnBlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnPart() throws Exception {
+ View targetView = flowport1_Part2TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnNestedPart() throws Exception {
+ View targetView = flowport1_NestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedPart() throws Exception {
+ View targetView = nestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceProperty() throws Exception {
+ View targetView = propertyTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedProperty() throws Exception {
+ View targetView = nestedPropertyTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+}

Back to the top