Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorcletavernie2013-06-18 14:04:55 +0000
committercletavernie2013-06-18 14:04:55 +0000
commiteb2902d61de4d9f491a98d07b9b989673a959738 (patch)
treee9c5732a25a12a80bd24a30402eb1491fea66a42 /tests
parent85ad3e29a192b1dbd3f1a129fdb1890e69ffa4b9 (diff)
downloadorg.eclipse.papyrus-eb2902d61de4d9f491a98d07b9b989673a959738.tar.gz
org.eclipse.papyrus-eb2902d61de4d9f491a98d07b9b989673a959738.tar.xz
org.eclipse.papyrus-eb2902d61de4d9f491a98d07b9b989673a959738.zip
403134: [Sequence Diagram] Create a lifeline if the target of Create message is not selected.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403134
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestMovingCombinedFragment_364711.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestMovingCombinedFragment_364711.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestMovingCombinedFragment_364711.java
index 717bf11c306..aa54c234006 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestMovingCombinedFragment_364711.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestMovingCombinedFragment_364711.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.canonical.CreateSequenceDiagramCommand;
import org.eclipse.papyrus.uml.diagram.sequence.tests.canonical.TestTopNode;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.junit.Test;
@@ -51,9 +52,9 @@ public class TestMovingCombinedFragment_364711 extends TestTopNode {
@Test
public void testMovingRight() {
- createNode(UMLElementTypes.Lifeline_3001, getRootEditPart(), new Point(20, 20));
- createNode(UMLElementTypes.CombinedFragment_3004, getRootEditPart(), new Point(10, 80));
+ createNode(UMLElementTypes.Lifeline_3001, getRootEditPart(), new Point(200, 20));
final LifelineEditPart lifelineEP = (LifelineEditPart)getRootEditPart().getChildren().get(0);
+ createNode(UMLElementTypes.CombinedFragment_3004, getRootEditPart(), SequenceUtil.getAbsoluteBounds(lifelineEP).getCenter().getTranslated(-210, 70));
final CombinedFragmentEditPart cep = (CombinedFragmentEditPart)getRootEditPart().getChildren().get(1);
waitForComplete(); // wait for updating covered field
@@ -84,8 +85,8 @@ public class TestMovingCombinedFragment_364711 extends TestTopNode {
@Test
public void testMovingLeft() {
createNode(UMLElementTypes.Lifeline_3001, getRootEditPart(), new Point(70, 20));
- createNode(UMLElementTypes.CombinedFragment_3004, getRootEditPart(), new Point(60, 80));
final LifelineEditPart lifelineEP = (LifelineEditPart)getRootEditPart().getChildren().get(0);
+ createNode(UMLElementTypes.CombinedFragment_3004, getRootEditPart(), SequenceUtil.getAbsoluteBounds(lifelineEP).getCenter().getTranslated(-2, 70));
final CombinedFragmentEditPart cep = (CombinedFragmentEditPart)getRootEditPart().getChildren().get(1);
waitForComplete(); // wait for updating covered field

Back to the top