Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java180
1 files changed, 91 insertions, 89 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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java
index b476916d57a..6c0443359d7 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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.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/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java
@@ -1,89 +1,91 @@
-/*****************************************************************************
- * 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 java.util.HashMap;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Property;
-import org.junit.BeforeClass;
-
-/**
- * JUnit tests for Connector link creation test (via palette tools).
- */
-public class TestCreationAndTestDelegateFromFlowPortOnNestedPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
-
- @BeforeClass
- public static void initSource() throws Exception {
- sourceView = flowport1_NestedPart1_Part1SourceView;
- }
-
- @BeforeClass
- public static void initToolID() throws Exception {
- toolID = "internalblock.tool.connector";
- }
-
- @BeforeClass
- public static void initExpectedResults() throws Exception {
-
- // Initialize source creation results
- isCreationAllowed = new HashMap<View, Boolean>();
-
- isCreationAllowed.put(blockTargetView, false);
-
- isCreationAllowed.put(actorPart2_BlockTargetView, true);
- isCreationAllowed.put(actorPart2_p1TargetView, true);
-
- isCreationAllowed.put(portOnBlockTargetView, true);
- isCreationAllowed.put(port1_Part2TargetView, true);
- isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
-
- isCreationAllowed.put(flowportOnBlockTargetView, true);
- isCreationAllowed.put(flowport1_Part2TargetView, true);
- isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
-
- isCreationAllowed.put(partTargetView, true);
- isCreationAllowed.put(nestedPart2_Part1TargetView, 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);
-
- // Initialize partWithPort for tests
- Property sourceNestedpart = (Property)p1_p1View.getElement();
-
- Property targetpart = (Property)p2View.getElement();
- Property targetNestedpart = (Property)p2_p1View.getElement();
-
- expectedSourcePartWithPort = new HashMap<View, ConnectableElement>();
- expectedTargetPartWithPort = new HashMap<View, ConnectableElement>();
-
- for (View view : isCreationAllowed.keySet()) {
- expectedSourcePartWithPort.put(view, sourceNestedpart);
- }
-
- expectedTargetPartWithPort.put(port1_Part2TargetView, targetpart);
- expectedTargetPartWithPort.put(flowport1_Part2TargetView, targetpart);
-
- expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, targetNestedpart);
- expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, targetNestedpart);
- }
-
-}
+/*****************************************************************************
+ * 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 java.util.HashMap;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromFlowPortOnNestedPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowport1_NestedPart1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed = new HashMap<View, Boolean>();
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, 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);
+
+ // Initialize partWithPort for tests
+ Property sourceNestedpart = (Property)p1_p1View.getElement();
+
+ Property targetpart = (Property)p2View.getElement();
+ Property targetNestedpart = (Property)p2_p1View.getElement();
+
+ expectedSourcePartWithPort = new HashMap<View, ConnectableElement>();
+ expectedTargetPartWithPort = new HashMap<View, ConnectableElement>();
+
+ for (View view : isCreationAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, sourceNestedpart);
+ }
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, targetpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, targetpart);
+
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, targetNestedpart);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, targetNestedpart);
+ }
+
+}

Back to the top