Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Notot2012-05-09 09:00:50 -0400
committerCedric Notot2012-05-09 09:00:50 -0400
commit8a860828a930ea43522f3aa1878f296ea6fcac15 (patch)
tree25b0f9e02f4bfeb298887b83a7d99bcdce625cab /plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req
parent876a0ed9b9e63ffc9d7441c3c4946221da21097c (diff)
downloadorg.eclipse.emf.compare-8a860828a930ea43522f3aa1878f296ea6fcac15.tar.gz
org.eclipse.emf.compare-8a860828a930ea43522f3aa1878f296ea6fcac15.tar.xz
org.eclipse.emf.compare-8a860828a930ea43522f3aa1878f296ea6fcac15.zip
Requirements computing
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java757
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/ReqInputData.java97
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/left.nodes5
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/right.nodes9
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/left.nodes5
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/right.nodes9
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/left.nodes8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/right.nodes10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/left.nodes8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/right.nodes10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/left.nodes10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/right.nodes12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/left.nodes2
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/right.nodes10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/left.nodes2
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/right.nodes6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/left.nodes4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/right.nodes6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/left.nodes4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/right.nodes6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/left.nodes5
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/right.nodes6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/left.nodes5
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/right.nodes6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/useCases25
25 files changed, 1027 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java
new file mode 100644
index 000000000..3b7f6122e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java
@@ -0,0 +1,757 @@
+package org.eclipse.emf.compare.tests.req;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertSame;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertTrue;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterators;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.EMFCompare;
+import org.eclipse.emf.compare.tests.req.data.ReqInputData;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.junit.Test;
+
+public class ReqComputingTest {
+
+ enum TestKind {
+ ADD, DELETE;
+ }
+
+ private ReqInputData input = new ReqInputData();
+
+ @Test
+ public void testA1UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ testAB1(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testA2UseCase() throws IOException {
+ final Resource left = input.getA2Left();
+ final Resource right = input.getA2Right();
+
+ testAB2(left, right, TestKind.DELETE);
+
+ }
+
+ @Test
+ public void testA3UseCase() throws IOException {
+ final Resource left = input.getA3Left();
+ final Resource right = input.getA3Right();
+
+ testAB3(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testA4UseCase() throws IOException {
+ final Resource left = input.getA4Left();
+ final Resource right = input.getA4Right();
+
+ testAB4(left, right, TestKind.DELETE);
+
+ }
+
+ @Test
+ public void testA5UseCase() throws IOException {
+ final Resource left = input.getA5Left();
+ final Resource right = input.getA5Right();
+
+ testAB5(left, right, TestKind.DELETE);
+
+ }
+
+ @Test
+ public void testA6UseCase() throws IOException {
+ final Resource left = input.getA6Left();
+ final Resource right = input.getA6Right();
+
+ testAB6(left, right, TestKind.DELETE);
+
+ }
+
+ @Test
+ public void testB1UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ testAB1(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testB2UseCase() throws IOException {
+ final Resource left = input.getA2Left();
+ final Resource right = input.getA2Right();
+
+ testAB2(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testB3UseCase() throws IOException {
+ final Resource left = input.getA3Left();
+ final Resource right = input.getA3Right();
+
+ testAB3(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testB4UseCase() throws IOException {
+ final Resource left = input.getA4Left();
+ final Resource right = input.getA4Right();
+
+ testAB4(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testB5UseCase() throws IOException {
+ final Resource left = input.getA5Left();
+ final Resource right = input.getA5Right();
+
+ testAB5(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testB6UseCase() throws IOException {
+ final Resource left = input.getA6Left();
+ final Resource right = input.getA6Right();
+
+ testAB6(right, left, TestKind.ADD);
+ }
+
+ @Test
+ public void testC1UseCase() throws IOException {
+ final Resource left = input.getC1Left();
+ final Resource right = input.getC1Right();
+
+ testCD1(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testC2UseCase() throws IOException {
+ final Resource left = input.getC2Left();
+ final Resource right = input.getC2Right();
+
+ testCD2(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testC3UseCase() throws IOException {
+ final Resource left = input.getC3Left();
+ final Resource right = input.getC3Right();
+
+ testCD3(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testC4UseCase() throws IOException {
+ final Resource left = input.getC4Left();
+ final Resource right = input.getC4Right();
+
+ testCD4(left, right, TestKind.DELETE);
+ }
+
+ @Test
+ public void testC5UseCase() throws IOException {
+ final Resource left = input.getC5Left();
+ final Resource right = input.getC5Right();
+
+ testCD5(left, right, TestKind.DELETE);
+ }
+
+ private static void testAB1(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 3 differences
+ assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteSourceDiffDescription = null;
+ Predicate<? super Diff> deleteDestinationDiffDescription = null;
+ Predicate<? super Diff> changedSingleValuedRefDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteSourceDiffDescription = removed("Requirements.containerSource.source"); //$NON-NLS-1$
+
+ deleteDestinationDiffDescription = removed("Requirements.containerDestination.destination"); //$NON-NLS-1$
+
+ changedSingleValuedRefDiffDescription = changedReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "singleValuedReference", "Requirements.containerDestination.destination", null); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ deleteSourceDiffDescription = added("Requirements.containerSource.source"); //$NON-NLS-1$
+
+ deleteDestinationDiffDescription = added("Requirements.containerDestination.destination"); //$NON-NLS-1$
+
+ changedSingleValuedRefDiffDescription = changedReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "singleValuedReference", null, "Requirements.containerDestination.destination"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ final Diff deleteSourceDiff = Iterators.find(differences.iterator(), deleteSourceDiffDescription);
+
+ final Diff deleteDestinationDiff = Iterators.find(differences.iterator(),
+ deleteDestinationDiffDescription);
+
+ final Diff changedSingleValuedRefDiff = Iterators.find(differences.iterator(),
+ changedSingleValuedRefDiffDescription);
+
+ assertNotNull(deleteSourceDiff);
+ assertNotNull(deleteDestinationDiff);
+ assertNotNull(changedSingleValuedRefDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteSourceDiff.getRequires().size()));
+ assertTrue(deleteSourceDiff.getRequires().contains(deleteDestinationDiff));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteDestinationDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(changedSingleValuedRefDiff.getRequires().size()));
+ assertTrue(changedSingleValuedRefDiff.getRequires().contains(deleteDestinationDiff));
+ assertTrue(changedSingleValuedRefDiff.getRequires().contains(deleteSourceDiff));
+ }
+
+ private static void testAB2(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 3 differences
+ assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteSourceDiffDescription = null;
+ Predicate<? super Diff> deleteDestinationDiffDescription = null;
+ Predicate<? super Diff> deleteMultiValuedRefDiffDescription = null;
+ if (kind.equals(TestKind.DELETE)) {
+ deleteSourceDiffDescription = removed("Requirements.containerSource.source"); //$NON-NLS-1$
+ deleteDestinationDiffDescription = removed("Requirements.containerDestination.destination"); //$NON-NLS-1$
+ deleteMultiValuedRefDiffDescription = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination"); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ deleteSourceDiffDescription = added("Requirements.containerSource.source"); //$NON-NLS-1$
+ deleteDestinationDiffDescription = added("Requirements.containerDestination.destination"); //$NON-NLS-1$
+ deleteMultiValuedRefDiffDescription = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ final Diff deleteSourceDiff = Iterators.find(differences.iterator(), deleteSourceDiffDescription);
+
+ final Diff deleteDestinationDiff = Iterators.find(differences.iterator(),
+ deleteDestinationDiffDescription);
+
+ final Diff deleteMultiValuedRefDiff = Iterators.find(differences.iterator(),
+ deleteMultiValuedRefDiffDescription);
+
+ assertNotNull(deleteSourceDiff);
+ assertNotNull(deleteDestinationDiff);
+ assertNotNull(deleteMultiValuedRefDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteSourceDiff.getRequires().size()));
+ assertTrue(deleteSourceDiff.getRequires().contains(deleteDestinationDiff));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteDestinationDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(deleteMultiValuedRefDiff.getRequires().size()));
+ assertTrue(deleteMultiValuedRefDiff.getRequires().contains(deleteDestinationDiff));
+ assertTrue(deleteMultiValuedRefDiff.getRequires().contains(deleteSourceDiff));
+ }
+
+ private static void testAB3(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 2 differences
+ assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteDestinationDiffDescription = null;
+ Predicate<? super Diff> changedSingleValuedRefDiffDescription = null;
+ if (kind.equals(TestKind.DELETE)) {
+ deleteDestinationDiffDescription = removed("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ changedSingleValuedRefDiffDescription = changedReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "singleValuedReference", "Requirements.containerDestination.destination2", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.destination1"); //$NON-NLS-1$
+ } else {
+ deleteDestinationDiffDescription = added("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ changedSingleValuedRefDiffDescription = changedReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "singleValuedReference", "Requirements.destination1", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ }
+
+ final Diff deleteDestinationDiff = Iterators.find(differences.iterator(),
+ deleteDestinationDiffDescription);
+
+ final Diff changedSingleValuedRefDiff = Iterators.find(differences.iterator(),
+ changedSingleValuedRefDiffDescription);
+
+ assertNotNull(deleteDestinationDiff);
+ assertNotNull(changedSingleValuedRefDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(1), Integer.valueOf(changedSingleValuedRefDiff.getRequires().size()));
+ assertTrue(changedSingleValuedRefDiff.getRequires().contains(deleteDestinationDiff));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteDestinationDiff.getRequires().size()));
+ }
+
+ private static void testAB4(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 3 differences
+ assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteDestinationDiffDescription = null;
+ Predicate<? super Diff> deletedMultiValuedRefDiffDescription = null;
+ Predicate<? super Diff> addedMultiValuedRefDiffDescription = null;
+ if (kind.equals(TestKind.DELETE)) {
+ deleteDestinationDiffDescription = removed("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ deletedMultiValuedRefDiffDescription = removedFromReference(
+ "Requirements.containerSource.source", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ addedMultiValuedRefDiffDescription = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination1"); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ deleteDestinationDiffDescription = added("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ deletedMultiValuedRefDiffDescription = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination2"); //$NON-NLS-1$ //$NON-NLS-2$
+ addedMultiValuedRefDiffDescription = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ final Diff deleteDestinationDiff = Iterators.find(differences.iterator(),
+ deleteDestinationDiffDescription);
+
+ final Diff deletedMultiValuedRefDiff = Iterators.find(differences.iterator(),
+ deletedMultiValuedRefDiffDescription);
+
+ final Diff addedMultiValuedRefDiff = Iterators.find(differences.iterator(),
+ addedMultiValuedRefDiffDescription);
+
+ assertNotNull(deleteDestinationDiff);
+ assertNotNull(deletedMultiValuedRefDiff);
+ assertNotNull(addedMultiValuedRefDiffDescription);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(1), Integer.valueOf(deletedMultiValuedRefDiff.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(addedMultiValuedRefDiff.getRequires().size()));
+ assertTrue(deletedMultiValuedRefDiff.getRequires().contains(deleteDestinationDiff));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteDestinationDiff.getRequires().size()));
+ }
+
+ private static void testAB5(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 8 differences
+ assertSame(Integer.valueOf(8), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> addDest4Description = null;
+ Predicate<? super Diff> delDest2Description = null;
+ Predicate<? super Diff> delDest3Description = null;
+ Predicate<? super Diff> addRefDest1Description = null;
+ Predicate<? super Diff> addRefDest4Description = null;
+ Predicate<? super Diff> delRefDest2Description = null;
+ Predicate<? super Diff> delRefDest3Description = null;
+ Predicate<? super Diff> delRefDest5Description = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ addDest4Description = added("Requirements.destination4"); //$NON-NLS-1$
+ delDest2Description = removed("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ delDest3Description = removed("Requirements.containerDestination.destination3"); //$NON-NLS-1$
+
+ addRefDest1Description = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination1"); //$NON-NLS-1$ //$NON-NLS-2$
+ addRefDest4Description = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination4"); //$NON-NLS-1$//$NON-NLS-2$
+ delRefDest2Description = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination2"); //$NON-NLS-1$ //$NON-NLS-2$
+ delRefDest3Description = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination3"); //$NON-NLS-1$ //$NON-NLS-2$
+ delRefDest5Description = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination5"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ addDest4Description = removed("Requirements.destination4"); //$NON-NLS-1$
+ delDest2Description = added("Requirements.containerDestination.destination2"); //$NON-NLS-1$
+ delDest3Description = added("Requirements.containerDestination.destination3"); //$NON-NLS-1$
+
+ addRefDest1Description = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination1"); //$NON-NLS-1$//$NON-NLS-2$
+ addRefDest4Description = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination4"); //$NON-NLS-1$//$NON-NLS-2$
+ delRefDest2Description = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination2"); //$NON-NLS-1$//$NON-NLS-2$
+ delRefDest3Description = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.containerDestination.destination3"); //$NON-NLS-1$ //$NON-NLS-2$
+ delRefDest5Description = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination5"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ final Diff addDest4 = Iterators.find(differences.iterator(), addDest4Description);
+ final Diff delDest2 = Iterators.find(differences.iterator(), delDest2Description);
+ final Diff delDest3 = Iterators.find(differences.iterator(), delDest3Description);
+
+ final Diff addRefDest1 = Iterators.find(differences.iterator(), addRefDest1Description);
+ final Diff addRefDest4 = Iterators.find(differences.iterator(), addRefDest4Description);
+ final Diff delRefDest2 = Iterators.find(differences.iterator(), delRefDest2Description);
+ final Diff delRefDest3 = Iterators.find(differences.iterator(), delRefDest3Description);
+ final Diff delRefDest5 = Iterators.find(differences.iterator(), delRefDest5Description);
+
+ assertNotNull(addDest4);
+ assertNotNull(delDest2);
+ assertNotNull(delDest3);
+ assertNotNull(addRefDest1);
+ assertNotNull(addRefDest4);
+ assertNotNull(delRefDest2);
+ assertNotNull(delRefDest3);
+ assertNotNull(delRefDest5);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(0), Integer.valueOf(addRefDest1.getRequires().size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(addRefDest4.getRequires().size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(delRefDest2.getRequires().size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(delRefDest3.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(delRefDest5.getRequires().size()));
+
+ assertTrue(addRefDest4.getRequires().contains(addDest4));
+ assertTrue(delRefDest2.getRequires().contains(delDest2));
+ assertTrue(delRefDest3.getRequires().contains(delDest3));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addDest4.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(delDest2.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(delDest3.getRequires().size()));
+ }
+
+ private static void testAB6(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 7 differences
+ assertSame(Integer.valueOf(7), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> delDestDescription = null;
+ Predicate<? super Diff> delContainerDescription = null;
+ Predicate<? super Diff> delSubContainerDescription = null;
+ Predicate<? super Diff> delSource1Description = null;
+ Predicate<? super Diff> delSource2Description = null;
+ Predicate<? super Diff> delRefSource1Description = null;
+ Predicate<? super Diff> delRefSource2Description = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ delDestDescription = removed("Requirements.destination"); //$NON-NLS-1$
+ delContainerDescription = removed("Requirements.container"); //$NON-NLS-1$
+ delSubContainerDescription = removed("Requirements.container.subContainer"); //$NON-NLS-1$
+ delSource1Description = removed("Requirements.container.subContainer.source1"); //$NON-NLS-1$
+ delSource2Description = removed("Requirements.container.subContainer.source2"); //$NON-NLS-1$
+
+ delRefSource1Description = changedReference("Requirements.container.subContainer.source1", //$NON-NLS-1$
+ "singleValuedReference", "Requirements.destination", null); //$NON-NLS-1$//$NON-NLS-2$
+ delRefSource2Description = removedFromReference("Requirements.container.subContainer.source2", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ delDestDescription = added("Requirements.destination"); //$NON-NLS-1$
+ delContainerDescription = added("Requirements.container"); //$NON-NLS-1$
+ delSubContainerDescription = added("Requirements.container.subContainer"); //$NON-NLS-1$
+ delSource1Description = added("Requirements.container.subContainer.source1"); //$NON-NLS-1$
+ delSource2Description = added("Requirements.container.subContainer.source2"); //$NON-NLS-1$
+
+ delRefSource1Description = changedReference("Requirements.container.subContainer.source1", //$NON-NLS-1$
+ "singleValuedReference", null, "Requirements.destination"); //$NON-NLS-1$ //$NON-NLS-2$
+ delRefSource2Description = addedToReference("Requirements.container.subContainer.source2", //$NON-NLS-1$
+ "multiValuedReference", "Requirements.destination"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ final Diff delDest = Iterators.find(differences.iterator(), delDestDescription);
+ final Diff delContainer = Iterators.find(differences.iterator(), delContainerDescription);
+ final Diff delSubContainer = Iterators.find(differences.iterator(), delSubContainerDescription);
+ final Diff delSource1 = Iterators.find(differences.iterator(), delSource1Description);
+ final Diff delSource2 = Iterators.find(differences.iterator(), delSource2Description);
+ final Diff delRefSource1 = Iterators.find(differences.iterator(), delRefSource1Description);
+ final Diff delRefSource2 = Iterators.find(differences.iterator(), delRefSource2Description);
+
+ assertNotNull(delDest);
+ assertNotNull(delContainer);
+ assertNotNull(delSubContainer);
+ assertNotNull(delSource1);
+ assertNotNull(delSource2);
+ assertNotNull(delRefSource1);
+ assertNotNull(delRefSource2);
+
+ // CHECK REQUIREMENT
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(delDest.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(delContainer.getRequires().size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(delSubContainer.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(delSource1.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(delSource2.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(delRefSource1.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(delRefSource2.getRequires().size()));
+
+ assertTrue(delSubContainer.getRequires().contains(delContainer));
+ assertTrue(delSource1.getRequires().contains(delSubContainer));
+ assertTrue(delSource2.getRequires().contains(delSubContainer));
+ assertTrue(delRefSource1.getRequires().contains(delSource1));
+ assertTrue(delRefSource2.getRequires().contains(delSource2));
+
+ assertTrue(delSource1.getRequires().contains(delDest));
+ assertTrue(delSource2.getRequires().contains(delDest));
+ assertTrue(delRefSource1.getRequires().contains(delDest));
+ assertTrue(delRefSource2.getRequires().contains(delDest));
+ }
+
+ private static void testCD1(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 5 differences
+ assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteADiffDescription = null;
+ Predicate<? super Diff> deleteBDiffDescription = null;
+ Predicate<? super Diff> deleteCDiffDescription = null;
+ Predicate<? super Diff> deleteRefBDiffDescription = null;
+ Predicate<? super Diff> deleteRefCDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteADiffDescription = removed("Requirements.A"); //$NON-NLS-1$
+ deleteBDiffDescription = removed("Requirements.B"); //$NON-NLS-1$
+ deleteCDiffDescription = removed("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ } else {
+ deleteADiffDescription = added("Requirements.A"); //$NON-NLS-1$
+ deleteBDiffDescription = added("Requirements.B"); //$NON-NLS-1$
+ deleteCDiffDescription = added("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ }
+
+ final Diff deleteADiff = Iterators.find(differences.iterator(), deleteADiffDescription);
+ final Diff deleteBDiff = Iterators.find(differences.iterator(), deleteBDiffDescription);
+ final Diff deleteCDiff = Iterators.find(differences.iterator(), deleteCDiffDescription);
+ final Diff deleteRefBDiff = Iterators.find(differences.iterator(), deleteRefBDiffDescription);
+ final Diff deleteRefCDiff = Iterators.find(differences.iterator(), deleteRefCDiffDescription);
+
+ assertNotNull(deleteADiff);
+ assertNotNull(deleteBDiff);
+ assertNotNull(deleteCDiff);
+ assertNotNull(deleteRefBDiff);
+ assertNotNull(deleteRefCDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(2), Integer.valueOf(deleteADiff.getRequires().size()));
+ assertTrue(deleteADiff.getRequires().contains(deleteBDiff));
+ assertTrue(deleteADiff.getRequires().contains(deleteCDiff));
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(deleteRefBDiff.getRequires().size()));
+ assertTrue(deleteRefBDiff.getRequires().contains(deleteBDiff));
+ assertTrue(deleteRefBDiff.getRequires().contains(deleteADiff));
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(deleteRefCDiff.getRequires().size()));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteCDiff));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteADiff));
+
+ }
+
+ private static void testCD2(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 5 differences
+ assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteADiffDescription = null;
+ Predicate<? super Diff> deleteCDiffDescription = null;
+ Predicate<? super Diff> deleteRefBDiffDescription = null;
+ Predicate<? super Diff> deleteRefCDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteADiffDescription = removed("Requirements.A"); //$NON-NLS-1$
+ deleteCDiffDescription = removed("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ } else {
+ deleteADiffDescription = added("Requirements.A"); //$NON-NLS-1$
+ deleteCDiffDescription = added("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ }
+
+ final Diff deleteADiff = Iterators.find(differences.iterator(), deleteADiffDescription);
+ final Diff deleteCDiff = Iterators.find(differences.iterator(), deleteCDiffDescription);
+ final Diff deleteRefBDiff = Iterators.find(differences.iterator(), deleteRefBDiffDescription);
+ final Diff deleteRefCDiff = Iterators.find(differences.iterator(), deleteRefCDiffDescription);
+
+ assertNotNull(deleteADiff);
+ assertNotNull(deleteCDiff);
+ assertNotNull(deleteRefBDiff);
+ assertNotNull(deleteRefCDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteADiff.getRequires().size()));
+ assertTrue(deleteADiff.getRequires().contains(deleteCDiff));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteRefBDiff.getRequires().size()));
+ assertTrue(deleteRefBDiff.getRequires().contains(deleteADiff));
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(deleteRefCDiff.getRequires().size()));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteCDiff));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteADiff));
+
+ }
+
+ private static void testCD3(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 5 differences
+ assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteBDiffDescription = null;
+ Predicate<? super Diff> deleteCDiffDescription = null;
+ Predicate<? super Diff> deleteRefBDiffDescription = null;
+ Predicate<? super Diff> deleteRefCDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteBDiffDescription = removed("Requirements.B"); //$NON-NLS-1$
+ deleteCDiffDescription = removed("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ } else {
+ deleteBDiffDescription = added("Requirements.B"); //$NON-NLS-1$
+ deleteCDiffDescription = added("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ }
+
+ final Diff deleteBDiff = Iterators.find(differences.iterator(), deleteBDiffDescription);
+ final Diff deleteCDiff = Iterators.find(differences.iterator(), deleteCDiffDescription);
+ final Diff deleteRefBDiff = Iterators.find(differences.iterator(), deleteRefBDiffDescription);
+ final Diff deleteRefCDiff = Iterators.find(differences.iterator(), deleteRefCDiffDescription);
+
+ assertNotNull(deleteBDiff);
+ assertNotNull(deleteCDiff);
+ assertNotNull(deleteRefBDiff);
+ assertNotNull(deleteRefCDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteBDiff.getRequires().size()));
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteCDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteRefBDiff.getRequires().size()));
+ assertTrue(deleteRefBDiff.getRequires().contains(deleteBDiff));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteRefCDiff.getRequires().size()));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteCDiff));
+
+ }
+
+ private static void testCD4(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 5 differences
+ assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteCDiffDescription = null;
+ Predicate<? super Diff> deleteRefBDiffDescription = null;
+ Predicate<? super Diff> deleteRefCDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteCDiffDescription = removed("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ } else {
+ deleteCDiffDescription = added("Requirements.C"); //$NON-NLS-1$
+ deleteRefBDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.B"); //$NON-NLS-1$
+ deleteRefCDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ }
+
+ final Diff deleteCDiff = Iterators.find(differences.iterator(), deleteCDiffDescription);
+ final Diff deleteRefBDiff = Iterators.find(differences.iterator(), deleteRefBDiffDescription);
+ final Diff deleteRefCDiff = Iterators.find(differences.iterator(), deleteRefCDiffDescription);
+
+ assertNotNull(deleteCDiff);
+ assertNotNull(deleteRefBDiff);
+ assertNotNull(deleteRefCDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteCDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteRefBDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteRefCDiff.getRequires().size()));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteCDiff));
+
+ }
+
+ private static void testCD5(final Resource left, final Resource right, TestKind kind) {
+ final Comparison comparison = EMFCompare.compare(left, right);
+
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 5 differences
+ assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> deleteCDiffDescription = null;
+ Predicate<? super Diff> deleteRefCDiffDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ deleteCDiffDescription = removed("Requirements.C"); //$NON-NLS-1$
+ deleteRefCDiffDescription = removedFromReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ } else {
+ deleteCDiffDescription = added("Requirements.C"); //$NON-NLS-1$
+ deleteRefCDiffDescription = addedToReference("Requirements.A", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.C"); //$NON-NLS-1$
+ }
+
+ final Diff deleteCDiff = Iterators.find(differences.iterator(), deleteCDiffDescription);
+ final Diff deleteRefCDiff = Iterators.find(differences.iterator(), deleteRefCDiffDescription);
+
+ assertNotNull(deleteCDiff);
+ assertNotNull(deleteRefCDiff);
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(0), Integer.valueOf(deleteCDiff.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(deleteRefCDiff.getRequires().size()));
+ assertTrue(deleteRefCDiff.getRequires().contains(deleteCDiff));
+
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/ReqInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/ReqInputData.java
new file mode 100644
index 000000000..4fb4b664c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/ReqInputData.java
@@ -0,0 +1,97 @@
+package org.eclipse.emf.compare.tests.req.data;
+
+import java.io.IOException;
+
+import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.ecore.resource.Resource;
+
+public class ReqInputData extends AbstractInputData {
+ public Resource getA1Left() throws IOException {
+ return loadFromClassloader("a1/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA1Right() throws IOException {
+ return loadFromClassloader("a1/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA2Left() throws IOException {
+ return loadFromClassloader("a2/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA2Right() throws IOException {
+ return loadFromClassloader("a2/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA3Left() throws IOException {
+ return loadFromClassloader("a3/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA3Right() throws IOException {
+ return loadFromClassloader("a3/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA4Left() throws IOException {
+ return loadFromClassloader("a4/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA4Right() throws IOException {
+ return loadFromClassloader("a4/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA5Left() throws IOException {
+ return loadFromClassloader("a5/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA5Right() throws IOException {
+ return loadFromClassloader("a5/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA6Left() throws IOException {
+ return loadFromClassloader("a6/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getA6Right() throws IOException {
+ return loadFromClassloader("a6/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC1Left() throws IOException {
+ return loadFromClassloader("c1/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC1Right() throws IOException {
+ return loadFromClassloader("c1/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC2Left() throws IOException {
+ return loadFromClassloader("c2/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC2Right() throws IOException {
+ return loadFromClassloader("c2/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC3Left() throws IOException {
+ return loadFromClassloader("c3/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC3Right() throws IOException {
+ return loadFromClassloader("c3/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC4Left() throws IOException {
+ return loadFromClassloader("c4/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC4Right() throws IOException {
+ return loadFromClassloader("c4/right.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC5Left() throws IOException {
+ return loadFromClassloader("c5/left.nodes"); //$NON-NLS-1$
+ }
+
+ public Resource getC5Right() throws IOException {
+ return loadFromClassloader("c5/right.nodes"); //$NON-NLS-1$
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/left.nodes
new file mode 100644
index 000000000..1c59d8c88
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/left.nodes
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_PIx7sJUfEeGiestbncRZoQ" name="containerSource"/>
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_khY4AJUfEeGiestbncRZoQ" name="containerDestination"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/right.nodes
new file mode 100644
index 000000000..c1d4cdf90
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a1/right.nodes
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_PIx7sJUfEeGiestbncRZoQ" name="containerSource">
+ <singleValueContainment xsi:type="nodes:NodeSingleValueReference" xmi:id="_TovDYJUgEeGiestbncRZoQ" name="source" singleValuedReference="_XKddsJUgEeGiestbncRZoQ"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_khY4AJUfEeGiestbncRZoQ" name="containerDestination">
+ <singleValueContainment xmi:id="_XKddsJUgEeGiestbncRZoQ" name="destination"/>
+ </containmentRef1>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/left.nodes
new file mode 100644
index 000000000..4a3973f35
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/left.nodes
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_lXBCwJW_EeG0rf2xmQ7T6A" name="containerSource"/>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_pS_JEJW_EeG0rf2xmQ7T6A" name="containerDestination"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/right.nodes
new file mode 100644
index 000000000..79e4dada3
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a2/right.nodes
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_lXBCwJW_EeG0rf2xmQ7T6A" name="containerSource">
+ <containmentRef2 xsi:type="nodes:NodeMultiValueReference" xmi:id="_eWZDMJXAEeG0rf2xmQ7T6A" name="source" multiValuedReference="_i5roMJXAEeG0rf2xmQ7T6A"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_pS_JEJW_EeG0rf2xmQ7T6A" name="containerDestination">
+ <containmentRef2 xmi:id="_i5roMJXAEeG0rf2xmQ7T6A" name="destination"/>
+ </containmentRef1>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/left.nodes
new file mode 100644
index 000000000..366091761
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/left.nodes
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_PIx7sJUfEeGiestbncRZoQ" name="containerSource">
+ <singleValueContainment xsi:type="nodes:NodeSingleValueReference" xmi:id="_7OmdQJXDEeGAd-lTZsrNaw" name="source" singleValuedReference="_-bda0JXDEeGAd-lTZsrNaw"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_khY4AJUfEeGiestbncRZoQ" name="containerDestination"/>
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/right.nodes
new file mode 100644
index 000000000..878b5ffb7
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a3/right.nodes
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_PIx7sJUfEeGiestbncRZoQ" name="containerSource">
+ <singleValueContainment xsi:type="nodes:NodeSingleValueReference" xmi:id="_7OmdQJXDEeGAd-lTZsrNaw" name="source" singleValuedReference="_RoOxsJXEEeGAd-lTZsrNaw"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeSingleValueContainment" xmi:id="_khY4AJUfEeGiestbncRZoQ" name="containerDestination">
+ <singleValueContainment xmi:id="_RoOxsJXEEeGAd-lTZsrNaw" name="destination2"/>
+ </containmentRef1>
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/left.nodes
new file mode 100644
index 000000000..c62cfb3fe
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/left.nodes
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_mDd_oJXsEeG8KoYbFpzr2g" name="containerSource">
+ <containmentRef2 xsi:type="nodes:NodeMultiValueReference" xmi:id="_6oMn8JXsEeG8KoYbFpzr2g" name="source" multiValuedReference="_-bda0JXDEeGAd-lTZsrNaw"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_n8_GAJXsEeG8KoYbFpzr2g" name="containerDestination"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/right.nodes
new file mode 100644
index 000000000..e72461458
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a4/right.nodes
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_mDd_oJXsEeG8KoYbFpzr2g" name="containerSource">
+ <containmentRef2 xsi:type="nodes:NodeMultiValueReference" xmi:id="_6oMn8JXsEeG8KoYbFpzr2g" name="source" multiValuedReference="_IclIYJXuEeG8KoYbFpzr2g"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_n8_GAJXsEeG8KoYbFpzr2g" name="containerDestination">
+ <containmentRef2 xmi:id="_IclIYJXuEeG8KoYbFpzr2g" name="destination2"/>
+ </containmentRef1>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/left.nodes
new file mode 100644
index 000000000..788b21b65
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/left.nodes
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_mDd_oJXsEeG8KoYbFpzr2g" name="containerSource">
+ <containmentRef2 xsi:type="nodes:NodeMultiValueReference" xmi:id="_6oMn8JXsEeG8KoYbFpzr2g" name="source" multiValuedReference="_-bda0JXDEeGAd-lTZsrNaw _coQIwJX0EeG8KoYbFpzr2g"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_n8_GAJXsEeG8KoYbFpzr2g" name="containerDestination"/>
+ <containmentRef1 xmi:id="_coQIwJX0EeG8KoYbFpzr2g" name="destination4"/>
+ <containmentRef1 xmi:id="_onKKwJX0EeG8KoYbFpzr2g" name="destination5"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/right.nodes
new file mode 100644
index 000000000..b7c3556fa
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a5/right.nodes
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_-bda0JXDEeGAd-lTZsrNaw" name="destination1"/>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_mDd_oJXsEeG8KoYbFpzr2g" name="containerSource">
+ <containmentRef2 xsi:type="nodes:NodeMultiValueReference" xmi:id="_6oMn8JXsEeG8KoYbFpzr2g" name="source" multiValuedReference="_IclIYJXuEeG8KoYbFpzr2g _PkwdQJX0EeG8KoYbFpzr2g _onKKwJX0EeG8KoYbFpzr2g"/>
+ </containmentRef1>
+ <containmentRef1 xsi:type="nodes:NodeMultipleContainment" xmi:id="_n8_GAJXsEeG8KoYbFpzr2g" name="containerDestination">
+ <containmentRef1 xmi:id="_IclIYJXuEeG8KoYbFpzr2g" name="destination2"/>
+ <containmentRef1 xmi:id="_PkwdQJX0EeG8KoYbFpzr2g" name="destination3"/>
+ </containmentRef1>
+ <containmentRef1 xmi:id="_onKKwJX0EeG8KoYbFpzr2g" name="destination5"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/left.nodes
new file mode 100644
index 000000000..1470bc07d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/left.nodes
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements"/>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/right.nodes
new file mode 100644
index 000000000..244259c37
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/a6/right.nodes
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_Ll2PUJYCEeG8KoYbFpzr2g" name="destination"/>
+ <containmentRef1 xmi:id="_ZwdT4JYCEeG8KoYbFpzr2g" name="container">
+ <containmentRef1 xmi:id="_c1X2YJYCEeG8KoYbFpzr2g" name="subContainer">
+ <containmentRef1 xsi:type="nodes:NodeSingleValueReference" xmi:id="_kCRh8JYCEeG8KoYbFpzr2g" name="source1" singleValuedReference="_Ll2PUJYCEeG8KoYbFpzr2g"/>
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_lvcOYJYCEeG8KoYbFpzr2g" name="source2" multiValuedReference="_Ll2PUJYCEeG8KoYbFpzr2g"/>
+ </containmentRef1>
+ </containmentRef1>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/left.nodes
new file mode 100644
index 000000000..1470bc07d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/left.nodes
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements"/>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/right.nodes
new file mode 100644
index 000000000..de9a86aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c1/right.nodes
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw _DbRD8Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+ <containmentRef1 xmi:id="_DbRD8Jm6EeG-CJ9tuKUrGw" name="C"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/left.nodes
new file mode 100644
index 000000000..ea98a1577
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/left.nodes
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/right.nodes
new file mode 100644
index 000000000..de9a86aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c2/right.nodes
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw _DbRD8Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+ <containmentRef1 xmi:id="_DbRD8Jm6EeG-CJ9tuKUrGw" name="C"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/left.nodes
new file mode 100644
index 000000000..904aad157
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/left.nodes
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/right.nodes
new file mode 100644
index 000000000..de9a86aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c3/right.nodes
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw _DbRD8Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+ <containmentRef1 xmi:id="_DbRD8Jm6EeG-CJ9tuKUrGw" name="C"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/left.nodes
new file mode 100644
index 000000000..3da3ee1f1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/left.nodes
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/right.nodes
new file mode 100644
index 000000000..de9a86aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c4/right.nodes
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw _DbRD8Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+ <containmentRef1 xmi:id="_DbRD8Jm6EeG-CJ9tuKUrGw" name="C"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/left.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/left.nodes
new file mode 100644
index 000000000..4316ced77
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/left.nodes
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/right.nodes b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/right.nodes
new file mode 100644
index 000000000..de9a86aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/c5/right.nodes
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nodes:Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nodes="http://www.eclipse.org/emf/compare/tests/nodes" xmi:id="_yWc_0JUeEeGiestbncRZoQ" name="Requirements">
+ <containmentRef1 xsi:type="nodes:NodeMultiValueReference" xmi:id="_BXEXkJm6EeG-CJ9tuKUrGw" name="A" multiValuedReference="_DGg78Jm6EeG-CJ9tuKUrGw _DbRD8Jm6EeG-CJ9tuKUrGw"/>
+ <containmentRef1 xmi:id="_DGg78Jm6EeG-CJ9tuKUrGw" name="B"/>
+ <containmentRef1 xmi:id="_DbRD8Jm6EeG-CJ9tuKUrGw" name="C"/>
+</nodes:Node>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/useCases b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/useCases
new file mode 100644
index 000000000..d66a15240
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/useCases
@@ -0,0 +1,25 @@
+This will try and list all possible "requirement" cases that can happen in a model comparison. For each use case, we will consider
+two models, "left" and "right".
+
+a - One business model object dependency - left changes
+ a1 - Object A (which references B with a single reference) and B are deleted.
+ a2 - Object A (which references B with a many reference) and B are deleted.
+ a3 - Object B is deleted and A references C instead of B (single reference).
+ a4 - Object B is deleted and A references C instead of B (many reference).
+ a5 - Several changes in the many reference.
+ a6 - References changed in the children of a node removed. Object container is removed with a sub-container which contains an object referencing (single and many reference) "destination"
+
+b - One business model object dependency - right changes
+ b1 - Object A (which references B with a single reference) and B are deleted.
+ b2 - Object A (which references B with a many reference) and B are deleted.
+ b3 - Object B is deleted and A references C instead of B (single reference).
+ b4 - Object B is deleted and A references C instead of B (many reference).
+ b5 - Several changes in the many reference.
+ b6 - References changed in the children of a node removed. Object container is added with a sub-container which contains an object referencing (single and many reference) "destination"
+
+c - many business model object dependency - left changes
+ c1 - Object A (which references B and C), B and C are deleted.
+ c2 - Object A (which references B and C) and C are deleted.
+ c3 - A reference to B (deleted) and C (deleted) is removed from object A.
+ c4 - A reference to B and C (deleted) is removed from object A.
+ c5 - A reference to C (deleted) is removed from object A. \ No newline at end of file

Back to the top