Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2012-11-09 11:02:47 +0000
committerMikaël Barbero2012-11-09 11:02:47 +0000
commite517d0862abac093893db9f1c5805a90312bed0a (patch)
tree2b9fc722211b04287d5ea38d2b9d46ad6b993b44 /plugins/org.eclipse.emf.compare.uml2.tests
parentfd016d8e191520c66e03251323c8c212da181eb4 (diff)
downloadorg.eclipse.emf.compare-e517d0862abac093893db9f1c5805a90312bed0a.tar.gz
org.eclipse.emf.compare-e517d0862abac093893db9f1c5805a90312bed0a.tar.xz
org.eclipse.emf.compare-e517d0862abac093893db9f1c5805a90312bed0a.zip
add test for static stereotypes detection
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/ProfilesInputData.java11
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java984
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/StaticStereotypeInputData.java90
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/left.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/right.uml4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/right.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/left.uml15
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/right.uml2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/left.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/right.uml9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/left.uml15
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/right.uml15
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/right.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/right.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/right.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/left.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/right.uml23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java4
24 files changed, 1449 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/ProfilesInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/ProfilesInputData.java
index b3b6c60fd..cbde23645 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/ProfilesInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/ProfilesInputData.java
@@ -12,11 +12,13 @@ import java.util.Set;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
+import org.eclipse.uml2.uml.UMLPlugin;
import org.eclipse.uml2.uml.resource.UMLResource;
import org.eclipse.uml2.uml.resources.ResourcesPlugin;
import org.eclipse.uml2.uml.resources.util.UMLResourcesUtil;
@@ -47,9 +49,18 @@ public class ProfilesInputData extends AbstractInputData {
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("ecore",
new EcoreResourceFactoryImpl());
resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
+ resourceSet.getPackageRegistry().put(UML2CompareTestProfilePackage.eNS_URI,
+ UML2CompareTestProfilePackage.eINSTANCE);
UMLResourcesUtil.init(resourceSet);
+ Map<String, URI> ePackageNsURIToProfileLocationMap = UMLPlugin
+ .getEPackageNsURIToProfileLocationMap();
+
+ ePackageNsURIToProfileLocationMap
+ .put(UML2CompareTestProfilePackage.eNS_URI,
+ URI.createURI("pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw")); //$NON-NLS-1$
+
final URL UMLJarredFileLocation = ResourcesPlugin.class.getResource("ResourcesPlugin.class");
String UMLJarPath = UMLJarredFileLocation.toString();
UMLJarPath = UMLJarPath.substring(0, UMLJarPath.indexOf('!'));
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
new file mode 100644
index 000000000..e18632eef
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
@@ -0,0 +1,984 @@
+package org.eclipse.emf.compare.uml2.tests.stereotypes;
+
+import static com.google.common.base.Predicates.and;
+import static com.google.common.base.Predicates.instanceOf;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertSame;
+import static junit.framework.Assert.assertTrue;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueIs;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatches;
+
+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.AttributeChange;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.EMFCompare;
+import org.eclipse.emf.compare.ReferenceChange;
+import org.eclipse.emf.compare.ResourceAttachmentChange;
+import org.eclipse.emf.compare.scope.IComparisonScope;
+import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.ProfileApplicationChange;
+import org.eclipse.emf.compare.uml2.StereotypeApplicationChange;
+import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.stereotypes.data.StaticStereotypeInputData;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.After;
+import org.junit.Test;
+
+@SuppressWarnings("nls")
+public class StaticStereotypeTest extends AbstractTest {
+
+ private StaticStereotypeInputData input = new StaticStereotypeInputData();
+
+ @After
+ public void cleanup() {
+ for (ResourceSet set : input.getSets()) {
+ for (Resource res : set.getResources()) {
+ res.unload();
+ }
+ set.getResources().clear();
+ }
+ }
+
+ @Test
+ public void testB10UseCase() throws IOException {
+ final Resource left = input.getB1Left();
+ final Resource right = input.getB1Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB1(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB11UseCase() throws IOException {
+ final Resource left = input.getB1Left();
+ final Resource right = input.getB1Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB1(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB10UseCase3way() throws IOException {
+ final Resource left = input.getB1Left();
+ final Resource right = input.getB1Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB1(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB11UseCase3way() throws IOException {
+ final Resource left = input.getB1Left();
+ final Resource right = input.getB1Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB1(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB20UseCase() throws IOException {
+ final Resource left = input.getB2Left();
+ final Resource right = input.getB2Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB2(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB21UseCase() throws IOException {
+ final Resource left = input.getB2Left();
+ final Resource right = input.getB2Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB2(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB20UseCase3way() throws IOException {
+ final Resource left = input.getB2Left();
+ final Resource right = input.getB2Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB2(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB21UseCase3way() throws IOException {
+ final Resource left = input.getB2Left();
+ final Resource right = input.getB2Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB2(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB30UseCase() throws IOException {
+ final Resource left = input.getB3Left();
+ final Resource right = input.getB3Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB3(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB31UseCase() throws IOException {
+ final Resource left = input.getB3Left();
+ final Resource right = input.getB3Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB3(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB30UseCase3way() throws IOException {
+ final Resource left = input.getB3Left();
+ final Resource right = input.getB3Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB3(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB31UseCase3way() throws IOException {
+ final Resource left = input.getB3Left();
+ final Resource right = input.getB3Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB3(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB40UseCase() throws IOException {
+ final Resource left = input.getB4Left();
+ final Resource right = input.getB4Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB4(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB41UseCase() throws IOException {
+ final Resource left = input.getB4Left();
+ final Resource right = input.getB4Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB4(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB40UseCase3way() throws IOException {
+ final Resource left = input.getB4Left();
+ final Resource right = input.getB4Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB4(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB41UseCase3way() throws IOException {
+ final Resource left = input.getB4Left();
+ final Resource right = input.getB4Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB4(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB50UseCase() throws IOException {
+ final Resource left = input.getB5Left();
+ final Resource right = input.getB5Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB5(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB51UseCase() throws IOException {
+ final Resource left = input.getB5Left();
+ final Resource right = input.getB5Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB5(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB50UseCase3way() throws IOException {
+ final Resource left = input.getB5Left();
+ final Resource right = input.getB5Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB5(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB51UseCase3way() throws IOException {
+ final Resource left = input.getB5Left();
+ final Resource right = input.getB5Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB5(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB60UseCase() throws IOException {
+ final Resource left = input.getB6Left();
+ final Resource right = input.getB6Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB6(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB61UseCase() throws IOException {
+ final Resource left = input.getB6Left();
+ final Resource right = input.getB6Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB6(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB60UseCase3way() throws IOException {
+ final Resource left = input.getB6Left();
+ final Resource right = input.getB6Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB6(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB61UseCase3way() throws IOException {
+ final Resource left = input.getB6Left();
+ final Resource right = input.getB6Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB6(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB70UseCase() throws IOException {
+ final Resource left = input.getB7Left();
+ final Resource right = input.getB7Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB7(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB71UseCase() throws IOException {
+ final Resource left = input.getB7Left();
+ final Resource right = input.getB7Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB7(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB70UseCase3way() throws IOException {
+ final Resource left = input.getB7Left();
+ final Resource right = input.getB7Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB7(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB71UseCase3way() throws IOException {
+ final Resource left = input.getB7Left();
+ final Resource right = input.getB7Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB7(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB80UseCase() throws IOException {
+ final Resource left = input.getB8Left();
+ final Resource right = input.getB8Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB8(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB81UseCase() throws IOException {
+ final Resource left = input.getB8Left();
+ final Resource right = input.getB8Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB8(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB80UseCase3way() throws IOException {
+ final Resource left = input.getB8Left();
+ final Resource right = input.getB8Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB8(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB81UseCase3way() throws IOException {
+ final Resource left = input.getB8Left();
+ final Resource right = input.getB8Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB8(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB90UseCase() throws IOException {
+ final Resource left = input.getB9Left();
+ final Resource right = input.getB9Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB9(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB91UseCase() throws IOException {
+ final Resource left = input.getB9Left();
+ final Resource right = input.getB9Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB9(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB90UseCase3way() throws IOException {
+ final Resource left = input.getB9Left();
+ final Resource right = input.getB9Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB9(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB91UseCase3way() throws IOException {
+ final Resource left = input.getB9Left();
+ final Resource right = input.getB9Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB9(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB100UseCase() throws IOException {
+ final Resource left = input.getB10Left();
+ final Resource right = input.getB10Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB10(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB101UseCase() throws IOException {
+ final Resource left = input.getB10Left();
+ final Resource right = input.getB10Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB10(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testB100UseCase3way() throws IOException {
+ final Resource left = input.getB10Left();
+ final Resource right = input.getB10Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, right);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB10(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testB101UseCase3way() throws IOException {
+ final Resource left = input.getB10Left();
+ final Resource right = input.getB10Right();
+
+ final IComparisonScope scope = EMFCompare.createDefaultScope(left, right, left);
+ final Comparison comparison = getCompare().compare(scope);
+ testAB10(TestKind.DELETE, comparison);
+ }
+
+ private void testAB1(TestKind kind, final Comparison comparison) {
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 6 differences
+ assertSame(Integer.valueOf(8), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> addProfileApplicationDescription = null;
+ Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
+ Predicate<? super Diff> addUMLAnnotationDescription = null;
+ Predicate<? super Diff> addReferencesInUMLAnnotationDescription = null;
+ Predicate<? super Diff> addStereotypeApplicationDescription = null;
+ Predicate<? super Diff> addRefBaseClassDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ addProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION));
+
+ // addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ // ofKind(DifferenceKind.CHANGE),
+ // onRealFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE),
+ // not(isChangeAdd()));
+
+ addUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS));
+
+ addReferencesInUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(EcorePackage.Literals.EANNOTATION__REFERENCES));
+ } else {
+ addProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.ADD),
+ onRealFeature(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION));
+
+ // addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ // ofKind(DifferenceKind.CHANGE),
+ // onRealFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE), isChangeAdd());
+
+ addUMLAnnotationDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.ADD),
+ onRealFeature(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS));
+
+ addReferencesInUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.ADD), onRealFeature(EcorePackage.Literals.EANNOTATION__REFERENCES));
+ }
+
+ addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("appliedProfile"));
+
+ addStereotypeApplicationDescription = instanceOf(ResourceAttachmentChange.class);
+ addRefBaseClassDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.CHANGE),
+ onFeature("base_Class"));
+
+ final Diff addProfileApplication = Iterators.find(differences.iterator(),
+ addProfileApplicationDescription);
+ final Diff addAppliedProfileInProfileApplication = Iterators.find(differences.iterator(),
+ addAppliedProfileInProfileApplicationDescription);
+ final Diff addUMLAnnotation = Iterators.find(differences.iterator(), addUMLAnnotationDescription);
+ final Diff addReferencesInUMLAnnotation = Iterators.find(differences.iterator(),
+ addReferencesInUMLAnnotationDescription);
+ final Diff addStereotypeApplication = Iterators.find(differences.iterator(),
+ addStereotypeApplicationDescription);
+ final Diff addRefBaseClass = Iterators.find(differences.iterator(), addRefBaseClassDescription);
+
+ assertNotNull(addProfileApplication);
+ assertNotNull(addAppliedProfileInProfileApplication);
+ assertNotNull(addUMLAnnotation);
+ assertNotNull(addReferencesInUMLAnnotation);
+ assertNotNull(addStereotypeApplication);
+ assertNotNull(addRefBaseClass);
+
+ // CHECK EXTENSION
+ assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ Diff addUMLProfileApplication = null;
+ Diff addUMLStereotypeApplication = null;
+ if (kind.equals(TestKind.ADD)) {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(2), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
+ assertTrue(addUMLProfileApplication.getRefinedBy()
+ .contains(addAppliedProfileInProfileApplication));
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
+ } else {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
+ }
+
+ // CHECK REQUIREMENT
+ if (kind.equals(TestKind.ADD)) {
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addProfileApplication.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
+
+ } else {
+ assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
+ assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+
+ }
+
+ // CHECK EQUIVALENCE
+ assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+
+ }
+
+ private void testAB2(TestKind kind, final Comparison comparison) {
+ 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> addAttributeDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ addAttributeDescription = and(instanceOf(AttributeChange.class), ofKind(DifferenceKind.DELETE),
+ onFeature("manyValuedAttribute"));
+ } else {
+ addAttributeDescription = and(instanceOf(AttributeChange.class), ofKind(DifferenceKind.ADD),
+ onFeature("manyValuedAttribute"));
+ }
+
+ final Diff addAttribute = Iterators.find(differences.iterator(), addAttributeDescription);
+ assertNotNull(addAttribute);
+
+ }
+
+ private void testAB3(TestKind kind, final Comparison comparison) {
+ final List<Diff> differences = comparison.getDifferences();
+
+ assertSame(Integer.valueOf(10), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> addProfileApplicationDescription = null;
+ Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
+ Predicate<? super Diff> addUMLAnnotationDescription = null;
+ Predicate<? super Diff> addReferencesInUMLAnnotationDescription = null;
+ Predicate<? super Diff> addStereotypeApplicationDescription = null;
+ Predicate<? super Diff> addModelDescription = null;
+ Predicate<? super Diff> addClassDescription = null;
+ Predicate<? super Diff> addRefBaseClassDescription = null;
+
+ if (kind.equals(TestKind.DELETE)) {
+ addProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION));
+
+ // addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ // ofKind(DifferenceKind.CHANGE),
+ // onRealFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE),
+ // not(isChangeAdd()));
+
+ addUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS));
+
+ addReferencesInUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE),
+ onRealFeature(EcorePackage.Literals.EANNOTATION__REFERENCES));
+ addModelDescription = removed("model.MyNiceModel");
+ addClassDescription = removed("model.MyNiceModel.Class1");
+
+ } else {
+ addProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.ADD),
+ onRealFeature(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION));
+
+ // addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ // ofKind(DifferenceKind.CHANGE),
+ // onRealFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE), isChangeAdd());
+
+ addUMLAnnotationDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.ADD),
+ onRealFeature(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS));
+
+ addReferencesInUMLAnnotationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.ADD), onRealFeature(EcorePackage.Literals.EANNOTATION__REFERENCES));
+ addModelDescription = added("model.MyNiceModel");
+ addClassDescription = added("model.MyNiceModel.Class1");
+ }
+
+ addAppliedProfileInProfileApplicationDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("appliedProfile"));
+
+ addStereotypeApplicationDescription = instanceOf(ResourceAttachmentChange.class);
+ addRefBaseClassDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.CHANGE),
+ onFeature("base_Class"));
+
+ final Diff addProfileApplication = Iterators.find(differences.iterator(),
+ addProfileApplicationDescription);
+ final Diff addAppliedProfileInProfileApplication = Iterators.find(differences.iterator(),
+ addAppliedProfileInProfileApplicationDescription);
+ final Diff addUMLAnnotation = Iterators.find(differences.iterator(), addUMLAnnotationDescription);
+ final Diff addReferencesInUMLAnnotation = Iterators.find(differences.iterator(),
+ addReferencesInUMLAnnotationDescription);
+ final Diff addStereotypeApplication = Iterators.find(differences.iterator(),
+ addStereotypeApplicationDescription);
+ final Diff addModel = Iterators.find(differences.iterator(), addModelDescription);
+ final Diff addClass = Iterators.find(differences.iterator(), addClassDescription);
+ final Diff addRefBaseClass = Iterators.find(differences.iterator(), addRefBaseClassDescription);
+
+ assertNotNull(addProfileApplication);
+ assertNotNull(addAppliedProfileInProfileApplication);
+ assertNotNull(addUMLAnnotation);
+ assertNotNull(addReferencesInUMLAnnotation);
+ assertNotNull(addStereotypeApplication);
+ assertNotNull(addModel);
+ assertNotNull(addClass);
+ assertNotNull(addRefBaseClass);
+
+ // CHECK EXTENSION
+ assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ Diff addUMLProfileApplication = null;
+ Diff addUMLStereotypeApplication = null;
+ if (kind.equals(TestKind.ADD)) {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(2), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
+ assertTrue(addUMLProfileApplication.getRefinedBy()
+ .contains(addAppliedProfileInProfileApplication));
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
+ } else {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
+ assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
+ }
+
+ // CHECK REQUIREMENT
+ if (kind.equals(TestKind.ADD)) {
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertTrue(addProfileApplication.getRequires().contains(addModel));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
+
+ } else {
+ assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
+ assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
+
+ assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+
+ }
+
+ // CHECK EQUIVALENCE
+ assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ }
+
+ private void testAB4(TestKind kind, final Comparison comparison) {
+ final List<Diff> differences = comparison.getDifferences();
+
+ // We should have no less and no more than 4 differences
+ assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> addStereotypeApplicationDescription = null;
+ Predicate<? super Diff> addClassDescription = null;
+
+ Diff addUMLStereotypeApplication = null;
+ if (kind.equals(TestKind.DELETE)) {
+ addClassDescription = removed("model.Class0");
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ } else {
+ addClassDescription = added("model.Class0");
+ addUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ }
+ addStereotypeApplicationDescription = instanceOf(ResourceAttachmentChange.class);
+
+ final Diff addClass = Iterators.find(differences.iterator(), addClassDescription);
+ final Diff addStereotypeApplication = Iterators.find(differences.iterator(),
+ addStereotypeApplicationDescription);
+ assertNotNull(addClass);
+ assertNotNull(addStereotypeApplication);
+ assertNotNull(addUMLStereotypeApplication);
+
+ }
+
+ private void testAB5(TestKind kind, final Comparison comparison) {
+ 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> changeAttributeDescription1 = null;
+ Predicate<? super Diff> changeAttributeDescription2 = null;
+
+ changeAttributeDescription1 = and(instanceOf(AttributeChange.class), ofKind(DifferenceKind.CHANGE),
+ onFeature("xmlName"), valueIs("clazz"));
+ changeAttributeDescription2 = and(instanceOf(AttributeChange.class), ofKind(DifferenceKind.CHANGE),
+ onFeature("className"), valueIs("theEClassName"));
+
+ final Diff changeAttribute1 = Iterators.find(differences.iterator(), changeAttributeDescription1);
+ final Diff changeAttribute2 = Iterators.find(differences.iterator(), changeAttributeDescription2);
+ final Diff changeUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.CHANGE)));
+ assertNotNull(changeAttribute1);
+ assertNotNull(changeAttribute2);
+ assertNotNull(changeUMLStereotypeApplication);
+
+ assertSame(Integer.valueOf(2), Integer.valueOf(changeUMLStereotypeApplication.getRefinedBy().size()));
+ assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute1));
+ assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute2));
+
+ }
+
+ private void testAB6(TestKind kind, final Comparison comparison) {
+ 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> addStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ if (kind.equals(TestKind.ADD)) {
+ addStereotypeRefDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.ADD),
+ onFeature("manyValuedReference"));
+ } else {
+ addStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.DELETE), onFeature("manyValuedReference"));
+ }
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff addStereotypeRef = Iterators.find(differences.iterator(), addStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(addStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(addStereotypeRef));
+
+ }
+
+ private void testAB7(TestKind kind, final Comparison comparison) {
+ 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> moveStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ moveStereotypeRefDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
+ onFeature("manyValuedReference"));
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff moveStereotypeRef = Iterators.find(differences.iterator(), moveStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(moveStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(moveStereotypeRef));
+
+ }
+
+ private void testAB8(TestKind kind, final Comparison comparison) {
+ 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> changeStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ if (kind.equals(TestKind.ADD)) {
+ changeStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"),
+ valueNameMatches("class0"));
+ } else {
+ changeStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"),
+ valueNameMatches("class1"));
+ }
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
+ changeStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(changeStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
+
+ }
+
+ private void testAB9(TestKind kind, final Comparison comparison) {
+ 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> changeStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ changeStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"), valueNameMatches("class0"));
+
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
+ changeStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(changeStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
+
+ }
+
+ private void testAB10(TestKind kind, final Comparison comparison) {
+ 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> changeStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ if (kind.equals(TestKind.ADD)) {
+ changeStereotypeRefDescription = and(instanceOf(AttributeChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("singleValuedAttribute"), valueIs("myValue"));
+ } else {
+ changeStereotypeRefDescription = and(instanceOf(AttributeChange.class),
+ ofKind(DifferenceKind.CHANGE), onFeature("singleValuedAttribute"), valueIs("oldValue"));
+ }
+
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
+ changeStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(changeStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
+
+ }
+
+ @Override
+ protected AbstractInputData getInput() {
+ return input;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/StaticStereotypeInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/StaticStereotypeInputData.java
new file mode 100644
index 000000000..3c0af93d8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/StaticStereotypeInputData.java
@@ -0,0 +1,90 @@
+package org.eclipse.emf.compare.uml2.tests.stereotypes.data;
+
+import java.io.IOException;
+
+import org.eclipse.emf.compare.uml2.tests.ProfilesInputData;
+import org.eclipse.emf.ecore.resource.Resource;
+
+public class StaticStereotypeInputData extends ProfilesInputData {
+
+ public Resource getB1Left() throws IOException {
+ return loadFromClassLoader("b1/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB1Right() throws IOException {
+ return loadFromClassLoader("b1/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB2Left() throws IOException {
+ return loadFromClassLoader("b2/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB2Right() throws IOException {
+ return loadFromClassLoader("b2/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB3Left() throws IOException {
+ return loadFromClassLoader("b3/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB3Right() throws IOException {
+ return loadFromClassLoader("b3/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB4Left() throws IOException {
+ return loadFromClassLoader("b4/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB4Right() throws IOException {
+ return loadFromClassLoader("b4/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB5Left() throws IOException {
+ return loadFromClassLoader("b5/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB5Right() throws IOException {
+ return loadFromClassLoader("b5/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB6Left() throws IOException {
+ return loadFromClassLoader("b6/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB6Right() throws IOException {
+ return loadFromClassLoader("b6/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB7Left() throws IOException {
+ return loadFromClassLoader("b7/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB7Right() throws IOException {
+ return loadFromClassLoader("b7/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB8Left() throws IOException {
+ return loadFromClassLoader("b8/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB8Right() throws IOException {
+ return loadFromClassLoader("b8/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB9Left() throws IOException {
+ return loadFromClassLoader("b9/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB9Right() throws IOException {
+ return loadFromClassLoader("b9/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB10Left() throws IOException {
+ return loadFromClassLoader("b10/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB10Right() throws IOException {
+ return loadFromClassLoader("b10/right.uml"); //$NON-NLS-1$
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/left.uml
new file mode 100644
index 000000000..177ec2a4d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/left.uml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_6rQaMGBlEeCwQ5tRW0zUZA" name="aModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OEBOkPNPEeG0ipjyqWM1zA" name="Test"/>
+ <profileApplication xmi:id="_WsrGcPNPEeG0ipjyqWM1zA">
+ <eAnnotations xmi:id="_WsrGcfNPEeG0ipjyqWM1zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_YeoMQPNPEeG0ipjyqWM1zA" base_Class="_OEBOkPNPEeG0ipjyqWM1zA"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/right.uml
new file mode 100644
index 000000000..62558c3b1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b1/right.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_6rQaMGBlEeCwQ5tRW0zUZA" name="aModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OEBOkPNPEeG0ipjyqWM1zA" name="Test"/>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/left.uml
new file mode 100644
index 000000000..130f89c3b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" singleValuedAttribute="myValue" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/right.uml
new file mode 100644
index 000000000..355fc6713
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b10/right.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" singleValuedAttribute="oldValue" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/left.uml
new file mode 100644
index 000000000..0e979e304
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass">
+ <ownedAttribute xmi:id="_mxkQcHyUEeCw7raschXiNQ" name="aProperty"/>
+ </packagedElement>
+ <profileApplication xmi:id="_ff5hsPNyEeG0ipjyqWM1zA">
+ <eAnnotations xmi:id="_ff5hsfNyEeG0ipjyqWM1zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_0r4XQPNyEeG0ipjyqWM1zA" base_Class="_C4IZsHxtEeCJOrA24Ue2iw">
+ <manyValuedAttribute>fr</manyValuedAttribute>
+ <manyValuedAttribute>en</manyValuedAttribute>
+ <manyValuedAttribute>dk</manyValuedAttribute>
+ <manyValuedAttribute>us</manyValuedAttribute>
+ <manyValuedAttribute>de</manyValuedAttribute>
+ </testProfile:ACliche>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/right.uml
new file mode 100644
index 000000000..c60219f1d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b2/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass">
+ <ownedAttribute xmi:id="_mxkQcHyUEeCw7raschXiNQ" name="aProperty"/>
+ </packagedElement>
+ <profileApplication xmi:id="_ff5hsPNyEeG0ipjyqWM1zA">
+ <eAnnotations xmi:id="_ff5hsfNyEeG0ipjyqWM1zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_0r4XQPNyEeG0ipjyqWM1zA" base_Class="_C4IZsHxtEeCJOrA24Ue2iw">
+ <manyValuedAttribute>fr</manyValuedAttribute>
+ <manyValuedAttribute>en</manyValuedAttribute>
+ <manyValuedAttribute>us</manyValuedAttribute>
+ <manyValuedAttribute>de</manyValuedAttribute>
+ </testProfile:ACliche>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/left.uml
new file mode 100644
index 000000000..017757e3f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/left.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_ba9ycKl0EeC3ls9UM5MxZg" name="model">
+ <packagedElement xmi:type="uml:Model" xmi:id="_jvL1wOs7EeCaS-R3nA6GlQ" name="MyNiceModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ku0GwOs7EeCaS-R3nA6GlQ" name="Class1"/>
+ <profileApplication xmi:id="_fkMeYPzfEeGvprorRl_paQ">
+ <eAnnotations xmi:id="_fkeyQPzfEeGvprorRl_paQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_hdsWoPzfEeGvprorRl_paQ" base_Class="_ku0GwOs7EeCaS-R3nA6GlQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/right.uml
new file mode 100644
index 000000000..9e13c555a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b3/right.uml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_ba9ycKl0EeC3ls9UM5MxZg" name="model"/>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/left.uml
new file mode 100644
index 000000000..9519d1667
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/left.uml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_GfO3Ifr8EeCcXd0vrIzyPg" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_MNDVkPr8EeCcXd0vrIzyPg" name="Class0"/>
+ <profileApplication xmi:id="_jAMnAPzmEeGvprorRl_paQ">
+ <eAnnotations xmi:id="_jAMnAfzmEeGvprorRl_paQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_lLJboPzmEeGvprorRl_paQ" base_Class="_MNDVkPr8EeCcXd0vrIzyPg"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/right.uml
new file mode 100644
index 000000000..184562ac1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b4/right.uml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_GfO3Ifr8EeCcXd0vrIzyPg" name="model">
+ <profileApplication xmi:id="_jAMnAPzmEeGvprorRl_paQ">
+ <eAnnotations xmi:id="_jAMnAfzmEeGvprorRl_paQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/left.uml
new file mode 100644
index 000000000..49a37cd64
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/left.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass"/>
+ <profileApplication xmi:id="_GzuskHxtEeCJOrA24Ue2iw">
+ <eAnnotations xmi:id="_Gzxv4HxtEeCJOrA24Ue2iw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <Ecore:EClass xmi:id="_ITG0oHxtEeCJOrA24Ue2iw" xmlName="clazz" base_Class="_C4IZsHxtEeCJOrA24Ue2iw" className="theEClassName"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/right.uml
new file mode 100644
index 000000000..03549ad5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b5/right.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass"/>
+ <profileApplication xmi:id="_GzuskHxtEeCJOrA24Ue2iw">
+ <eAnnotations xmi:id="_Gzxv4HxtEeCJOrA24Ue2iw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <Ecore:EClass xmi:id="_ITG0oHxtEeCJOrA24Ue2iw" base_Class="_C4IZsHxtEeCJOrA24Ue2iw"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/left.uml
new file mode 100644
index 000000000..46cac03b8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" manyValuedReference="_ON4lwIwrEeCIzv0DzikA6A _PSh5oIwrEeCIzv0DzikA6A _PdwSMIwrEeCIzv0DzikA6A _QNMLEIwrEeCIzv0DzikA6A _QNMLEYwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/right.uml
new file mode 100644
index 000000000..31dd56383
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b6/right.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" manyValuedReference="_ON4lwIwrEeCIzv0DzikA6A _PSh5oIwrEeCIzv0DzikA6A _PdwSMIwrEeCIzv0DzikA6A _QNMLEIwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/left.uml
new file mode 100644
index 000000000..344da5548
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" manyValuedReference="_ON4lwIwrEeCIzv0DzikA6A _PdwSMIwrEeCIzv0DzikA6A _QNMLEIwrEeCIzv0DzikA6A _PSh5oIwrEeCIzv0DzikA6A _QNMLEYwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/right.uml
new file mode 100644
index 000000000..46cac03b8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b7/right.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" manyValuedReference="_ON4lwIwrEeCIzv0DzikA6A _PSh5oIwrEeCIzv0DzikA6A _PdwSMIwrEeCIzv0DzikA6A _QNMLEIwrEeCIzv0DzikA6A _QNMLEYwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/left.uml
new file mode 100644
index 000000000..6a61ce7d3
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" singleValuedReference="_ON4lwIwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/right.uml
new file mode 100644
index 000000000..f9468383b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b8/right.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" singleValuedReference="_PSh5oIwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/left.uml
new file mode 100644
index 000000000..6a61ce7d3
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/left.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" singleValuedReference="_ON4lwIwrEeCIzv0DzikA6A" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/right.uml
new file mode 100644
index 000000000..0b9d4fa0b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/b9/right.uml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:testProfile="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile">
+ <uml:Model xmi:id="_K4q9cYwrEeCIzv0DzikA6A" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_MtslYIwrEeCIzv0DzikA6A" name="data">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ON4lwIwrEeCIzv0DzikA6A" name="class0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PSh5oIwrEeCIzv0DzikA6A" name="class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PdwSMIwrEeCIzv0DzikA6A" name="class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEIwrEeCIzv0DzikA6A" name="class3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEYwrEeCIzv0DzikA6A" name="class4"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_QNMLEowrEeCIzv0DzikA6A" name="class5"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_TydBkIwrEeCIzv0DzikA6A" name="underTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VGFMoIwrEeCIzv0DzikA6A" name="TheClassToTest"/>
+ <profileApplication xmi:id="_z2wzEP24EeGEdImiEXpPEw">
+ <eAnnotations xmi:id="_z24H0P24EeGEdImiEXpPEw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile#//uml2comparetestprofile"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <testProfile:ACliche xmi:id="_4fWu0P24EeGEdImiEXpPEw" base_Class="_VGFMoIwrEeCIzv0DzikA6A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
index a3dcfb395..4f1d49f35 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
@@ -35,6 +35,7 @@ import org.eclipse.emf.compare.uml2.tests.generalizationSet.AddGeneralizationSet
import org.eclipse.emf.compare.uml2.tests.include.AddIncludeTest;
import org.eclipse.emf.compare.uml2.tests.message.AddMessageTest;
import org.eclipse.emf.compare.uml2.tests.profiles.ProfileTest;
+import org.eclipse.emf.compare.uml2.tests.stereotypes.StaticStereotypeTest;
import org.eclipse.emf.compare.uml2.tests.stereotypes.StereotypeTest;
import org.eclipse.emf.compare.uml2.tests.timeConstraint.AddTimeConstraintTest;
import org.eclipse.emf.ecore.EPackage;
@@ -58,7 +59,8 @@ import org.junit.runners.Suite.SuiteClasses;
AddGeneralizationSetTest.class, AddInterfaceRealizationTest.class, AddRealizationTest.class,
AddSubstitutionTest.class, AddUsageTest.class, AddMessageTest.class,
AddActionExecutionSpecificationTest.class, AddBehaviorExecutionSpecificationTest.class,
- AddIncludeTest.class, AddTimeConstraintTest.class, ProfileTest.class, StereotypeTest.class })
+ AddIncludeTest.class, AddTimeConstraintTest.class, ProfileTest.class, StereotypeTest.class,
+ StaticStereotypeTest.class })
public class AllTests {
/**

Back to the top