Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2015-03-10 15:28:06 -0400
committerPhilip Langer2015-03-10 15:28:06 -0400
commitf4420f85337d0fbc7acc1c1210ccae4087b97a15 (patch)
tree6f2d5093bbf7a1349ea7d6918d33cf4f7abea76c /plugins/org.eclipse.emf.compare.uml2.tests
parent92029f6241a7a1a0e7e6584690ec43a746938fd6 (diff)
downloadorg.eclipse.emf.compare-f4420f85337d0fbc7acc1c1210ccae4087b97a15.tar.gz
org.eclipse.emf.compare-f4420f85337d0fbc7acc1c1210ccae4087b97a15.tar.xz
org.eclipse.emf.compare-f4420f85337d0fbc7acc1c1210ccae4087b97a15.zip
[458147] Three-way merging for rejecting opaque element body changes
Bug: 458147 Change-Id: I5462f6f514efddf5e5a9f12982e015a84fe95743 Signed-off-by: Philip Langer <planger@eclipsesource.com>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
index 78c576dc1..5ba901019 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 EclipseSource Muenchen GmbH and others.
+ * Copyright (c) 2014, 2015 EclipseSource Muenchen GmbH and others.
* 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
@@ -185,6 +185,36 @@ public class OpaqueElementBodyChangeMergeTest extends AbstractUMLTest {
}
@Test
+ public void testA1UseCase_ApplyLeftRevertRightChangeThreeWay() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ OpaqueAction leftAction = (OpaqueAction)left.getEObject(OPAQUE_ACTION1_ID);
+ String leftBody = leftAction.getBodies().get(0);
+
+ Comparison comparison = compare(left, right, origin);
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ revertRightOpaqueElementBodyChanges(comparison);
+ assertOneBodyWithContents(right, leftBody);
+ }
+
+ @Test
+ public void testA1UseCase_ApplyRightRevertLeftChangeThreeWay() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ OpaqueAction rightAction = (OpaqueAction)right.getEObject(OPAQUE_ACTION1_ID);
+ String rightBody = rightAction.getBodies().get(0);
+
+ Comparison comparison = compare(left, right, origin);
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ revertLeftOpaqueElementBodyChanges(comparison);
+ assertOneBodyWithContents(left, rightBody);
+ }
+
+ @Test
public void testA2UseCase() throws IOException {
Resource origin = input.getA2Origin();
Resource left = input.getA2Left();

Back to the top