Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2014-03-20 13:53:01 -0400
committerMikaƫl Barbero2014-03-27 13:40:08 -0400
commitd9aca9c1a60d3985eb20034ba07c76d6e227fc4a (patch)
tree726e6e52b34812bd2aa5ee0f17b44d5a1794aab9
parentef78e5f14d9090f10505d8f5c714ca2699964c3b (diff)
downloadorg.eclipse.emf.compare-d9aca9c1a60d3985eb20034ba07c76d6e227fc4a.tar.gz
org.eclipse.emf.compare-d9aca9c1a60d3985eb20034ba07c76d6e227fc4a.tar.xz
org.eclipse.emf.compare-d9aca9c1a60d3985eb20034ba07c76d6e227fc4a.zip
Update Luna target file to M6
- also remove ecoretools from the maven luna profile - set bounds to o.e.e.c.diagram.ide.ui.ecoretools dependency to ecoretools [1,2) - remove the ecoretools plugin from the update site - remove UML2 and papyrus extensions for Kepler. Master is now requiring UML 5.0 Change-Id: I4b967471f3f021af34607cee1fc7f72fa3ae44aa
-rw-r--r--org.eclipse.emf.compare-parent/.project6
-rw-r--r--org.eclipse.emf.compare-parent/pom.xml12
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.target66
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.targetplatform4
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target71
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.targetplatform6
-rw-r--r--packaging/org.eclipse.emf.compare.update/category.xml3
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.papyrus.tests/src/org/eclipse/emf/compare/diagram/papyrus/tests/merge/EdgeMergeTest.java2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.rcp.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.rcp/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java43
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java47
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java41
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java43
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java40
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java43
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java302
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF2
23 files changed, 197 insertions, 561 deletions
diff --git a/org.eclipse.emf.compare-parent/.project b/org.eclipse.emf.compare-parent/.project
index 7da11dffd..e68b1c124 100644
--- a/org.eclipse.emf.compare-parent/.project
+++ b/org.eclipse.emf.compare-parent/.project
@@ -5,7 +5,13 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/org.eclipse.emf.compare-parent/pom.xml b/org.eclipse.emf.compare-parent/pom.xml
index fe0e0bbd9..a061932ee 100644
--- a/org.eclipse.emf.compare-parent/pom.xml
+++ b/org.eclipse.emf.compare-parent/pom.xml
@@ -299,10 +299,10 @@
<module>../plugins/org.eclipse.emf.compare.diagram.edit</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui</module>
- <module>../packaging/org.eclipse.emf.compare.diagram.ecoretools-feature</module>
+ <!--module>../packaging/org.eclipse.emf.compare.diagram.ecoretools-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ecoretools.tests</module>
- <module>../plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests</module>
+ <module>../plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests</module-->
<module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
@@ -337,12 +337,12 @@
<modules>
<module>../plugins/org.eclipse.emf.compare.ide.ui.tests.git</module>
- <module>../packaging/org.eclipse.emf.compare.uml2-feature</module>
+ <!--module>../packaging/org.eclipse.emf.compare.uml2-feature</module>
<module>../plugins/org.eclipse.emf.compare.uml2</module>
<module>../plugins/org.eclipse.emf.compare.uml2.edit</module>
<module>../plugins/org.eclipse.emf.compare.uml2.rcp</module>
<module>../plugins/org.eclipse.emf.compare.uml2.rcp.ui</module>
- <module>../plugins/org.eclipse.emf.compare.uml2.tests</module>
+ <module>../plugins/org.eclipse.emf.compare.uml2.tests</module-->
<module>../packaging/org.eclipse.emf.compare.diagram.gmf-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram</module>
@@ -354,9 +354,9 @@
<module>../plugins/org.eclipse.emf.compare.diagram.ecoretools.tests</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests</module>
- <module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
+ <!--module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
- <module>../plugins/org.eclipse.emf.compare.diagram.papyrus.tests</module>
+ <module>../plugins/org.eclipse.emf.compare.diagram.papyrus.tests</module-->
</modules>
</profile>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.target
index e55af9c16..7ec6bf7f0 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.target
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?><target name="EMF Compare based on Kepler SDK" sequenceNumber="0">
-<locations>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="com.google.guava" version="11.0.2.v201303041551"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20131024145017/repository/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M6"/>
-<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M6"/>
-<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M6"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
-<unit id="org.junit4" version="4.8.1.v20120523-1257"/>
-<repository location="http://download.eclipse.org/releases/juno"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.feature.group" version="2.9.1.v20130902-0605"/>
-<unit id="org.eclipse.emf.transaction.feature.group" version="1.7.0.201306111400"/>
-<unit id="org.eclipse.uml2.feature.group" version="4.1.1.v20130902-0826"/>
-<unit id="org.eclipse.platform.sdk" version="4.3.1.M20130911-1000"/>
-<unit id="org.junit" version="4.11.0.v201303080030"/>
-<unit id="org.eclipse.egit.feature.group" version="3.0.3.201309161630-r"/>
-<unit id="org.eclipse.gmf.feature.group" version="1.7.0.201306111432"/>
-<unit id="org.eclipse.gmf.runtime.notation.feature.group" version="1.7.0.201306101425"/>
-<unit id="org.eclipse.emf.ecoretools.feature.group" version="1.2.0.201306071421"/>
-<unit id="org.eclipse.papyrus.infra.core.feature.feature.group" version="0.10.1.v201309181302"/>
-<unit id="org.eclipse.papyrus.infra.emf.feature.feature.group" version="0.10.1.v201309181302"/>
-<unit id="org.eclipse.papyrus.infra.gmfdiag.feature.feature.group" version="0.10.1.v201309181302"/>
-<unit id="org.eclipse.papyrus.uml.diagram.feature.feature.group" version="0.10.1.v201309181302"/>
-<unit id="org.eclipse.papyrus.uml.tools.feature.feature.group" version="0.10.1.v201309181302"/>
-<repository location="http://download.eclipse.org/releases/kepler"/>
-</location>
-</locations>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="EMF Compare based on Kepler SDK" sequenceNumber="1395929699">
+ <locations>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.sdk.ide" version="4.3.2.M20140221-1700"/>
+ <unit id="org.eclipse.emf.sdk.feature.group" version="2.9.2.v20140203-1126"/>
+ <unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="1.2.0.201306071421"/>
+ <unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.7.0.201306111432"/>
+ <unit id="org.eclipse.uml2.sdk.feature.group" version="4.1.2.v20140202-2055"/>
+ <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.10.2.v201402191554"/>
+ <unit id="org.eclipse.egit.feature.group" version="3.2.0.201312181205-r"/>
+ <repository location="http://download.eclipse.org/releases/kepler"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.junit4" version="4.8.1.v20100525"/>
+ <repository location="http://download.eclipse.org/releases/helios"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="com.google.guava" version="11.0.2.v201303041551"/>
+ <unit id="com.google.guava.source" version="11.0.2.v201303041551"/>
+ <unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+ <unit id="javaewah" version="0.5.6.v201210150900"/>
+ <unit id="org.apache.commons.compress" version="1.4.1.v201301140946"/>
+ <unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M5"/>
+ <unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
+ <repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M5"/>
+ </location>
+ </locations>
</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.targetplatform b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.targetplatform
index da069da50..8e56f042b 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.targetplatform
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-sdk.targetplatform
@@ -1,4 +1,6 @@
-target "EMF Compare based on Kepler SDK" with requirements, source
+target "EMF Compare based on Kepler SDK"
+
+with requirements, source
location "http://download.eclipse.org/releases/kepler" {
org.eclipse.sdk.ide
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
index 6dfbe78cf..60f3e1c7e 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
@@ -1,35 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?><target name="EMF Compare based on Luna M5" sequenceNumber="0">
-<locations>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="com.google.guava" version="11.0.2.v201303041551"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20131024145017/repository/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M6"/>
-<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M6"/>
-<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M6"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
-<unit id="org.junit4" version="4.8.1.v20120523-1257"/>
-<repository location="http://download.eclipse.org/releases/juno"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.feature.group" version="2.10.0.v20140127-0448"/>
-<unit id="org.eclipse.emf.transaction.feature.group" version="1.8.0.201401271944"/>
-<unit id="org.eclipse.uml2.feature.group" version="5.0.0.v20140127-0906"/>
-<unit id="org.eclipse.platform.sdk" version="4.4.0.I20140123-1600"/>
-<unit id="org.junit" version="4.11.0.v201303080030"/>
-<unit id="org.eclipse.egit.feature.group" version="3.2.0.201312181205-r"/>
-<unit id="org.eclipse.gmf.feature.group" version="1.8.0.201401272007"/>
-<unit id="org.eclipse.gmf.runtime.notation.feature.group" version="1.8.0.201401271537"/>
-<unit id="org.eclipse.emf.ecoretools.feature.group" version="2.0.0.201401281049"/>
-<unit id="org.eclipse.papyrus.infra.core.feature.feature.group" version="1.0.0.v201401290914"/>
-<unit id="org.eclipse.papyrus.infra.emf.feature.feature.group" version="1.0.0.v201401290914"/>
-<unit id="org.eclipse.papyrus.infra.gmfdiag.feature.feature.group" version="1.0.0.v201401290914"/>
-<unit id="org.eclipse.papyrus.uml.diagram.feature.feature.group" version="1.0.0.v201401290914"/>
-<unit id="org.eclipse.papyrus.uml.tools.feature.feature.group" version="1.0.0.v201401290914"/>
-<repository location="http://download.eclipse.org/releases/luna"/>
-</location>
-</locations>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="EMF Compare based on Luna M6" sequenceNumber="1395929936">
+ <locations>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.sdk.ide" version="4.4.0.I20140306-1200"/>
+ <unit id="org.eclipse.emf.feature.group" version="2.10.0.v20140310-0546"/>
+ <unit id="org.eclipse.emf.transaction.feature.group" version="1.8.0.201403111732"/>
+ <unit id="org.eclipse.gmf.feature.group" version="1.8.0.201403111830"/>
+ <unit id="org.eclipse.gmf.runtime.notation.feature.group" version="1.8.0.201403111536"/>
+ <unit id="org.eclipse.uml2.feature.group" version="5.0.0.v20140310-0733"/>
+ <unit id="org.eclipse.papyrus.infra.core.feature.feature.group" version="1.0.0.v201403121345"/>
+ <unit id="org.eclipse.papyrus.infra.emf.feature.feature.group" version="1.0.0.v201403121345"/>
+ <unit id="org.eclipse.papyrus.infra.gmfdiag.feature.feature.group" version="1.0.0.v201403121345"/>
+ <unit id="org.eclipse.papyrus.uml.diagram.feature.feature.group" version="1.0.0.v201403121345"/>
+ <unit id="org.eclipse.papyrus.uml.tools.feature.feature.group" version="1.0.0.v201403121345"/>
+ <unit id="org.eclipse.egit.feature.group" version="3.3.0.201403021825-r"/>
+ <repository location="http://download.eclipse.org/releases/luna"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.junit4" version="4.8.1.v20120523-1257"/>
+ <repository location="http://download.eclipse.org/releases/juno"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="com.google.guava" version="11.0.2.v201303041551"/>
+ <unit id="com.google.guava.source" version="11.0.2.v201303041551"/>
+ <unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+ <unit id="javaewah" version="0.7.9.v201401101600"/>
+ <unit id="org.apache.commons.compress" version="1.6.0.v201310281400"/>
+ <unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M6"/>
+ <unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M6"/>
+ <repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M6"/>
+ </location>
+ </locations>
</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.targetplatform b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.targetplatform
index a1077eab0..3dceed399 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.targetplatform
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.targetplatform
@@ -1,13 +1,13 @@
-target "EMF Compare based on Luna M6" with source, requirements
+target "EMF Compare based on Luna M6"
+
+with source, requirements
location "http://download.eclipse.org/releases/luna" {
-
org.eclipse.sdk.ide
org.eclipse.emf.feature.group
org.eclipse.emf.transaction.feature.group
org.eclipse.gmf.feature.group
org.eclipse.gmf.runtime.notation.feature.group
- org.eclipse.emf.ecoretools.feature.group
org.eclipse.uml2.feature.group
org.eclipse.papyrus.infra.core.feature.feature.group
org.eclipse.papyrus.infra.emf.feature.feature.group
diff --git a/packaging/org.eclipse.emf.compare.update/category.xml b/packaging/org.eclipse.emf.compare.update/category.xml
index 6c0888350..3822c3cad 100644
--- a/packaging/org.eclipse.emf.compare.update/category.xml
+++ b/packaging/org.eclipse.emf.compare.update/category.xml
@@ -24,9 +24,6 @@
<feature id="org.eclipse.emf.compare.diagram.gmf" version="0.0.0">
<category name="compare_integration"/>
</feature>
- <feature id="org.eclipse.emf.compare.diagram.ecoretools" version="0.0.0">
- <category name="compare_integration"/>
- </feature>
<feature id="org.eclipse.emf.compare.diagram.papyrus" version="0.0.0">
<category name="compare_integration"/>
</feature>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
index c09f947da..8f97c2a38 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
@@ -12,8 +12,7 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.5.0",
org.eclipse.emf.compare,
org.eclipse.gmf.runtime.emf.core;bundle-version="1.2.2",
org.eclipse.gmf.runtime.notation;bundle-version="1.2.0",
- org.eclipse.ui;bundle-version="3.5.0",
- org.eclipse.emf.compare.uml2;bundle-version="2.1.0"
+ org.eclipse.ui;bundle-version="3.5.0"
Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
com.google.common.collect;version="[11.0.0,15.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
index 08414b057..a65bf3dff 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.compare.AttributeChange;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
@@ -30,8 +29,6 @@ import org.eclipse.emf.compare.merge.ReferenceChangeMerger;
import org.eclipse.emf.compare.merge.ResourceAttachmentChangeMerger;
import org.eclipse.emf.compare.scope.DefaultComparisonScope;
import org.eclipse.emf.compare.scope.IComparisonScope;
-import org.eclipse.emf.compare.uml2.internal.UMLDiff;
-import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -55,18 +52,13 @@ public class ExtensionMergeTest extends AbstractTest {
final Comparison comparisonBefore = getCompare().compare(scope);
EList<Diff> differences = comparisonBefore.getDifferences();
final IMerger.Registry registry = IMerger.RegistryImpl.createStandaloneInstance();
- final IMerger umlMerger = new UMLMerger();
- umlMerger.setRanking(11);
final IMerger diagramMerger = new CompareDiagramMerger();
diagramMerger.setRanking(11);
- registry.add(umlMerger);
registry.add(diagramMerger);
for (Diff diff : differences) {
final Class<? extends IMerger> expectedMerger;
if (diff instanceof DiagramDiff) {
expectedMerger = CompareDiagramMerger.class;
- } else if (diff instanceof UMLDiff) {
- expectedMerger = UMLMerger.class;
} else if (diff instanceof AttributeChange) {
expectedMerger = AttributeChangeMerger.class;
} else if (diff instanceof ReferenceChange) {
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
index 146da57ae..2f2908abc 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
@@ -6,5 +6,5 @@ Bundle-Vendor: %providerName
Bundle-Version: 2.3.0.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.emf.compare.diagram.ide.ui;bundle-version="3.0.0",
- org.eclipse.emf.ecoretools.diagram
+ org.eclipse.emf.ecoretools;bundle-version="[1.0.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests/src/org/eclipse/emf/compare/diagram/papyrus/tests/merge/EdgeMergeTest.java b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests/src/org/eclipse/emf/compare/diagram/papyrus/tests/merge/EdgeMergeTest.java
index f2c1e8480..9582f083a 100644
--- a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests/src/org/eclipse/emf/compare/diagram/papyrus/tests/merge/EdgeMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests/src/org/eclipse/emf/compare/diagram/papyrus/tests/merge/EdgeMergeTest.java
@@ -92,7 +92,7 @@ public class EdgeMergeTest extends AbstractTest {
private static final int A6_NODECHANGE1_NB = 26;
private static final int A6_NODECHANGES_NB = 2 * A6_NODECHANGE1_NB;
- private static final int A6_DEPENDENCY_EDGE_CHANGE1_NB = 13;
+ private static final int A6_DEPENDENCY_EDGE_CHANGE1_NB = 12;
private static final int A6_DEPENDENCY_EDGE_CHANGES_NB = 11 * A6_DEPENDENCY_EDGE_CHANGE1_NB;
private static final int A6_ASSO_EDGE_CHANGE1_NB = 21;
private static final int A6_ASSO_EDGE_CHANGES_NB = 2 * A6_ASSO_EDGE_CHANGE1_NB;
diff --git a/plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF
index 8f6e1c886..239715698 100644
--- a/plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF
@@ -13,9 +13,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.edit;visibility:=reexport,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.uml2.uml;bundle-version="5.0.0",
org.eclipse.emf.compare,
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.uml2.uml.edit;bundle-version="5.0.0",
org.eclipse.emf.compare.edit
Bundle-ActivationPolicy: lazy
Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
diff --git a/plugins/org.eclipse.emf.compare.uml2.rcp.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.rcp.ui/META-INF/MANIFEST.MF
index 8599add75..2c74cba77 100644
--- a/plugins/org.eclipse.emf.compare.uml2.rcp.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2.rcp.ui/META-INF/MANIFEST.MF
@@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
org.eclipse.swt;bundle-version="3.5.0",
org.eclipse.emf.compare.rcp.ui;bundle-version="2.0.1",
org.eclipse.core.runtime;bundle-version="3.5.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0"
+ org.eclipse.uml2.uml;bundle-version="5.0.0"
Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
com.google.common.collect;version="[11.0.0,15.0.0)"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.compare.uml2.rcp/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.rcp/META-INF/MANIFEST.MF
index cd791277a..0088b0d81 100644
--- a/plugins/org.eclipse.emf.compare.uml2.rcp/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2.rcp/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Version: 2.2.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.compare.rcp;bundle-version="2.1.0",
org.eclipse.emf.ecore,
- org.eclipse.uml2.uml;bundle-version="4.0.0"
+ org.eclipse.uml2.uml;bundle-version="5.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
index d6a060f46..af0335caf 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
@@ -12,13 +12,13 @@ Export-Package: org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile
org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util,
org.eclipse.emf.compare.uml2.tests
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.uml2.uml.resources;bundle-version="4.0.0",
+ org.eclipse.uml2.uml;bundle-version="5.0.0",
+ org.eclipse.uml2.uml.resources;bundle-version="5.0.0",
org.junit,
org.eclipse.emf.compare,
org.eclipse.emf.compare.uml2,
org.eclipse.emf.compare.tests;bundle-version="2.0.1",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0"
+ org.eclipse.uml2.uml.edit;bundle-version="5.0.0"
Bundle-ActivationPolicy: lazy
Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
com.google.common.collect;version="[11.0.0,15.0.0)"
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
index e0abc1b0e..02db99fb3 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
@@ -2,14 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -21,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -84,26 +86,22 @@ public class AddAbstractionTest extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ // Was 5 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(4, differences.size());
Predicate<? super Diff> addAbstractionDescription = null;
- Predicate<? super Diff> addRefAbstractionInClass1Description = null;
Predicate<? super Diff> addRefClass1InAbstractionDescription = null;
Predicate<? super Diff> addRefClass0InAbstractionDescription = null;
if (kind.equals(TestKind.DELETE)) {
addAbstractionDescription = removed("model.Abstraction0"); //$NON-NLS-1$
- addRefAbstractionInClass1Description = removedFromReference("model.Class1", "clientDependency",
- "model.Abstraction0");
addRefClass1InAbstractionDescription = removedFromReference("model.Abstraction0", "client",
"model.Class1");
addRefClass0InAbstractionDescription = removedFromReference("model.Abstraction0", "supplier",
"model.Class0");
} else {
addAbstractionDescription = added("model.Abstraction0"); //$NON-NLS-1$
- addRefAbstractionInClass1Description = addedToReference("model.Class1", "clientDependency",
- "model.Abstraction0");
addRefClass1InAbstractionDescription = addedToReference("model.Abstraction0", "client",
"model.Class1");
addRefClass0InAbstractionDescription = addedToReference("model.Abstraction0", "supplier",
@@ -111,15 +109,12 @@ public class AddAbstractionTest extends AbstractUMLTest {
}
final Diff addAbstraction = Iterators.find(differences.iterator(), addAbstractionDescription);
- final Diff addRefAbstractionInClass1 = Iterators.find(differences.iterator(),
- addRefAbstractionInClass1Description);
final Diff addRefClass1InAbstraction = Iterators.find(differences.iterator(),
addRefClass1InAbstractionDescription);
final Diff addRefClass0InAbstraction = Iterators.find(differences.iterator(),
addRefClass0InAbstractionDescription);
assertNotNull(addAbstraction);
- assertNotNull(addRefAbstractionInClass1);
assertNotNull(addRefClass1InAbstraction);
assertNotNull(addRefClass0InAbstraction);
@@ -134,11 +129,10 @@ public class AddAbstractionTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InAbstraction));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InAbstraction));
assertTrue(addUMLDependency.getRefinedBy().contains(addAbstraction));
- assertTrue(addUMLDependency.getRefinedBy().contains(addRefAbstractionInClass1));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -148,9 +142,6 @@ public class AddAbstractionTest extends AbstractUMLTest {
assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass0InAbstraction.getRequires().size()));
assertTrue(addRefClass0InAbstraction.getRequires().contains(addAbstraction));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefAbstractionInClass1.getRequires().size()));
- assertTrue(addRefAbstractionInClass1.getRequires().contains(addAbstraction));
-
assertSame(Integer.valueOf(0), Integer.valueOf(addAbstraction.getRequires().size()));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
} else {
@@ -158,24 +149,16 @@ public class AddAbstractionTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass0InAbstraction.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAbstractionInClass1.getRequires().size()));
-
- assertSame(Integer.valueOf(3), Integer.valueOf(addAbstraction.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(addAbstraction.getRequires().size()));
assertTrue(addAbstraction.getRequires().contains(addRefClass1InAbstraction));
assertTrue(addAbstraction.getRequires().contains(addRefClass0InAbstraction));
- assertTrue(addAbstraction.getRequires().contains(addRefAbstractionInClass1));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
-
- assertNotNull(addRefClass1InAbstraction.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass1InAbstraction.getEquivalence()
- .getDifferences().size()));
- assertTrue(addRefClass1InAbstraction.getEquivalence().getDifferences().contains(
- addRefAbstractionInClass1));
+ assertEquals(0, comparison.getEquivalences().size());
+ assertNull(addRefClass1InAbstraction.getEquivalence());
testIntersections(comparison);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
index da878b530..00ed56db6 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
@@ -2,14 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -21,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -83,26 +85,22 @@ public class AddDependencyTest extends AbstractUMLTest {
protected void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ // Was 5 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(4, differences.size());
Predicate<? super Diff> addDependencyDescription = null;
- Predicate<? super Diff> addRefDependencyInClass0Description = null;
Predicate<? super Diff> addRefClass1InDependencyDescription = null;
Predicate<? super Diff> addRefClass0InDependencyDescription = null;
if (kind.equals(TestKind.DELETE)) {
addDependencyDescription = removed("model.Dependency0"); //$NON-NLS-1$
- addRefDependencyInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Dependency0");
addRefClass0InDependencyDescription = removedFromReference("model.Dependency0", "client",
"model.Class0");
addRefClass1InDependencyDescription = removedFromReference("model.Dependency0", "supplier",
"model.Class1");
} else {
addDependencyDescription = added("model.Dependency0"); //$NON-NLS-1$
- addRefDependencyInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Dependency0");
addRefClass0InDependencyDescription = addedToReference("model.Dependency0", "client",
"model.Class0");
addRefClass1InDependencyDescription = addedToReference("model.Dependency0", "supplier",
@@ -110,15 +108,12 @@ public class AddDependencyTest extends AbstractUMLTest {
}
final Diff addDependency = Iterators.find(differences.iterator(), addDependencyDescription);
- final Diff addRefDependencyInClass0 = Iterators.find(differences.iterator(),
- addRefDependencyInClass0Description);
final Diff addRefClass0InDependency = Iterators.find(differences.iterator(),
addRefClass0InDependencyDescription);
final Diff addRefClass1InDependency = Iterators.find(differences.iterator(),
addRefClass1InDependencyDescription);
assertNotNull(addDependency);
- assertNotNull(addRefDependencyInClass0);
assertNotNull(addRefClass0InDependency);
assertNotNull(addRefClass1InDependency);
@@ -133,11 +128,10 @@ public class AddDependencyTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
- assertTrue(addUMLDependency.getRefinedBy().contains(addRefDependencyInClass0));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -147,9 +141,6 @@ public class AddDependencyTest extends AbstractUMLTest {
assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
- assertTrue(addRefDependencyInClass0.getRequires().contains(addDependency));
-
assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
} else {
@@ -157,24 +148,22 @@ public class AddDependencyTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
-
- assertSame(Integer.valueOf(3), Integer.valueOf(addDependency.getRequires().size()));
+ // Was 3 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertTrue(addDependency.getRequires().contains(addRefDependencyInClass0));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
+ // Was 1 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(0, comparison.getEquivalences().size());
- assertNotNull(addRefClass0InDependency.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass0InDependency.getEquivalence()
- .getDifferences().size()));
- assertTrue(addRefClass0InDependency.getEquivalence().getDifferences().contains(
- addRefDependencyInClass0));
+ // Was not null with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertNull(addRefClass0InDependency.getEquivalence());
+ // assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass0InDependency.getEquivalence()
+ // .getDifferences().size()));
testIntersections(comparison);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
index 35eac4c93..64096728d 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
@@ -2,13 +2,15 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -20,8 +22,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -82,14 +84,14 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
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(6), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 5 differences
+ // Was 6 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(5, differences.size());
Predicate<? super Diff> addInterfaceRealizationDescription = null;
Predicate<? super Diff> addClientInInterfaceRealizationDescription = null;
Predicate<? super Diff> addSupplierInInterfaceRealizationDescription = null;
Predicate<? super Diff> addContractInInterfaceRealizationDescription = null;
- Predicate<? super Diff> addClientDependencyInClass0Description = null;
if (kind.equals(TestKind.DELETE)) {
//addInterfaceRealizationDescription = removed("model.Class0.InterfaceRealization0"); //$NON-NLS-1$
@@ -101,8 +103,6 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
"model.Class0.InterfaceRealization0", "supplier", "model.Interface0");
addContractInInterfaceRealizationDescription = changedReference(
"model.Class0.InterfaceRealization0", "contract", "model.Interface0", null);
- addClientDependencyInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Class0.InterfaceRealization0");
} else {
//addInterfaceRealizationDescription = added("model.Class0.InterfaceRealization0"); //$NON-NLS-1$
addInterfaceRealizationDescription = addedToReference(
@@ -113,8 +113,6 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
"model.Class0.InterfaceRealization0", "supplier", "model.Interface0");
addContractInInterfaceRealizationDescription = changedReference(
"model.Class0.InterfaceRealization0", "contract", null, "model.Interface0");
- addClientDependencyInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Class0.InterfaceRealization0");
}
final Diff addInterfaceRealization = Iterators.find(differences.iterator(),
@@ -125,14 +123,11 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
addSupplierInInterfaceRealizationDescription);
final Diff addContractInInterfaceRealization = Iterators.find(differences.iterator(),
addContractInInterfaceRealizationDescription);
- final Diff addClientDependencyInClass0 = Iterators.find(differences.iterator(),
- addClientDependencyInClass0Description);
assertNotNull(addInterfaceRealization);
assertNotNull(addClientInInterfaceRealization);
assertNotNull(addSupplierInInterfaceRealization);
assertNotNull(addContractInInterfaceRealization);
- assertNotNull(addClientDependencyInClass0);
// CHECK EXTENSION
assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
@@ -145,12 +140,11 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(5), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addClientInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addSupplierInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addContractInInterfaceRealization));
- assertTrue(addUMLDependency.getRefinedBy().contains(addClientDependencyInClass0));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -174,25 +168,18 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
.size()));
- assertSame(Integer.valueOf(4), Integer.valueOf(addInterfaceRealization.getRequires().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addInterfaceRealization.getRequires().size()));
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addSupplierInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addContractInInterfaceRealization));
- assertTrue(addInterfaceRealization.getRequires().contains(addClientDependencyInClass0));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
-
- assertNotNull(addClientInInterfaceRealization.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addClientInInterfaceRealization.getEquivalence()
- .getDifferences().size()));
- assertTrue(addClientInInterfaceRealization.getEquivalence().getDifferences().contains(
- addClientInInterfaceRealization));
- assertTrue(addClientInInterfaceRealization.getEquivalence().getDifferences().contains(
- addClientDependencyInClass0));
+ assertEquals(0, comparison.getEquivalences().size());
+
+ assertNull(addClientInInterfaceRealization.getEquivalence());
testIntersections(comparison);
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
index b0f646656..ebba6b537 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
@@ -2,14 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -21,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -84,26 +86,22 @@ public class AddRealizationTest extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ // Was 5 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(4, differences.size());
Predicate<? super Diff> addRealizationDescription = null;
- Predicate<? super Diff> addRefRealizationInClass0Description = null;
Predicate<? super Diff> addRefClass1InRealizationDescription = null;
Predicate<? super Diff> addRefClass0InRealizationDescription = null;
if (kind.equals(TestKind.DELETE)) {
addRealizationDescription = removed("model.Realization0"); //$NON-NLS-1$
- addRefRealizationInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Realization0");
addRefClass0InRealizationDescription = removedFromReference("model.Realization0", "client",
"model.Class0");
addRefClass1InRealizationDescription = removedFromReference("model.Realization0", "supplier",
"model.Class1");
} else {
addRealizationDescription = added("model.Realization0"); //$NON-NLS-1$
- addRefRealizationInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Realization0");
addRefClass0InRealizationDescription = addedToReference("model.Realization0", "client",
"model.Class0");
addRefClass1InRealizationDescription = addedToReference("model.Realization0", "supplier",
@@ -111,15 +109,12 @@ public class AddRealizationTest extends AbstractUMLTest {
}
final Diff addDependency = Iterators.find(differences.iterator(), addRealizationDescription);
- final Diff addRefDependencyInClass0 = Iterators.find(differences.iterator(),
- addRefRealizationInClass0Description);
final Diff addRefClass0InDependency = Iterators.find(differences.iterator(),
addRefClass0InRealizationDescription);
final Diff addRefClass1InDependency = Iterators.find(differences.iterator(),
addRefClass1InRealizationDescription);
assertNotNull(addDependency);
- assertNotNull(addRefDependencyInClass0);
assertNotNull(addRefClass0InDependency);
assertNotNull(addRefClass1InDependency);
@@ -134,11 +129,10 @@ public class AddRealizationTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
- assertTrue(addUMLDependency.getRefinedBy().contains(addRefDependencyInClass0));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -148,9 +142,6 @@ public class AddRealizationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
- assertTrue(addRefDependencyInClass0.getRequires().contains(addDependency));
-
assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
} else {
@@ -158,24 +149,16 @@ public class AddRealizationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
-
- assertSame(Integer.valueOf(3), Integer.valueOf(addDependency.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertTrue(addDependency.getRequires().contains(addRefDependencyInClass0));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
-
- assertNotNull(addRefClass0InDependency.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass0InDependency.getEquivalence()
- .getDifferences().size()));
- assertTrue(addRefClass0InDependency.getEquivalence().getDifferences().contains(
- addRefDependencyInClass0));
+ assertEquals(0, comparison.getEquivalences().size());
+ assertNull(addRefClass0InDependency.getEquivalence());
testIntersections(comparison);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
index 47ea9ee87..62da2f0e2 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
@@ -2,13 +2,15 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -20,8 +22,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -84,14 +86,14 @@ public class AddSubstitutionTest extends AbstractUMLTest {
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(6), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 5 differences
+ // Was 6 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(5, differences.size());
Predicate<? super Diff> addInterfaceRealizationDescription = null;
Predicate<? super Diff> addClientInInterfaceRealizationDescription = null;
Predicate<? super Diff> addSupplierInInterfaceRealizationDescription = null;
Predicate<? super Diff> addContractInInterfaceRealizationDescription = null;
- Predicate<? super Diff> addClientDependencyInClass0Description = null;
if (kind.equals(TestKind.DELETE)) {
addInterfaceRealizationDescription = removedFromReference("model.Class0", "substitution",
@@ -102,8 +104,6 @@ public class AddSubstitutionTest extends AbstractUMLTest {
"supplier", "model.Class1");
addContractInInterfaceRealizationDescription = changedReference("model.Class0.Substitution0",
"contract", "model.Class1", null);
- addClientDependencyInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Class0.Substitution0");
} else {
addInterfaceRealizationDescription = addedToReference(
"model.Class0", "substitution", "model.Class0.Substitution0"); //$NON-NLS-1$
@@ -113,8 +113,6 @@ public class AddSubstitutionTest extends AbstractUMLTest {
"supplier", "model.Class1");
addContractInInterfaceRealizationDescription = changedReference("model.Class0.Substitution0",
"contract", null, "model.Class1");
- addClientDependencyInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Class0.Substitution0");
}
final Diff addInterfaceRealization = Iterators.find(differences.iterator(),
@@ -125,14 +123,11 @@ public class AddSubstitutionTest extends AbstractUMLTest {
addSupplierInInterfaceRealizationDescription);
final Diff addContractInInterfaceRealization = Iterators.find(differences.iterator(),
addContractInInterfaceRealizationDescription);
- final Diff addClientDependencyInClass0 = Iterators.find(differences.iterator(),
- addClientDependencyInClass0Description);
assertNotNull(addInterfaceRealization);
assertNotNull(addClientInInterfaceRealization);
assertNotNull(addSupplierInInterfaceRealization);
assertNotNull(addContractInInterfaceRealization);
- assertNotNull(addClientDependencyInClass0);
// CHECK EXTENSION
assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
@@ -145,12 +140,11 @@ public class AddSubstitutionTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(5), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addClientInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addSupplierInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addContractInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addInterfaceRealization));
- assertTrue(addUMLDependency.getRefinedBy().contains(addClientDependencyInClass0));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -174,25 +168,17 @@ public class AddSubstitutionTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
.size()));
- assertSame(Integer.valueOf(4), Integer.valueOf(addInterfaceRealization.getRequires().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addInterfaceRealization.getRequires().size()));
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addSupplierInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addContractInInterfaceRealization));
- assertTrue(addInterfaceRealization.getRequires().contains(addClientDependencyInClass0));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
-
- assertNotNull(addClientInInterfaceRealization.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addClientInInterfaceRealization.getEquivalence()
- .getDifferences().size()));
- assertTrue(addClientInInterfaceRealization.getEquivalence().getDifferences().contains(
- addClientInInterfaceRealization));
- assertTrue(addClientInInterfaceRealization.getEquivalence().getDifferences().contains(
- addClientDependencyInClass0));
+ assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertNull(addClientInInterfaceRealization.getEquivalence());
testIntersections(comparison);
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
index b9d66b1a4..88ae7042f 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
@@ -2,14 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -21,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -84,40 +86,33 @@ public class AddUsageTest extends AbstractUMLTest {
protected void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ // Was 5 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
+ assertEquals(4, differences.size());
Predicate<? super Diff> addDependencyDescription = null;
- Predicate<? super Diff> addRefDependencyInClass0Description = null;
Predicate<? super Diff> addRefClass1InDependencyDescription = null;
Predicate<? super Diff> addRefClass0InDependencyDescription = null;
if (kind.equals(TestKind.DELETE)) {
addDependencyDescription = removed("model.Usage0"); //$NON-NLS-1$
- addRefDependencyInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Usage0");
addRefClass0InDependencyDescription = removedFromReference("model.Usage0", "client",
"model.Class0");
addRefClass1InDependencyDescription = removedFromReference("model.Usage0", "supplier",
"model.Class1");
} else {
addDependencyDescription = added("model.Usage0"); //$NON-NLS-1$
- addRefDependencyInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Usage0");
addRefClass0InDependencyDescription = addedToReference("model.Usage0", "client", "model.Class0");
addRefClass1InDependencyDescription = addedToReference("model.Usage0", "supplier", "model.Class1");
}
final Diff addDependency = Iterators.find(differences.iterator(), addDependencyDescription);
- final Diff addRefDependencyInClass0 = Iterators.find(differences.iterator(),
- addRefDependencyInClass0Description);
final Diff addRefClass0InDependency = Iterators.find(differences.iterator(),
addRefClass0InDependencyDescription);
final Diff addRefClass1InDependency = Iterators.find(differences.iterator(),
addRefClass1InDependencyDescription);
assertNotNull(addDependency);
- assertNotNull(addRefDependencyInClass0);
assertNotNull(addRefClass0InDependency);
assertNotNull(addRefClass1InDependency);
@@ -132,11 +127,10 @@ public class AddUsageTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
- assertTrue(addUMLDependency.getRefinedBy().contains(addRefDependencyInClass0));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
@@ -146,9 +140,6 @@ public class AddUsageTest extends AbstractUMLTest {
assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
- assertTrue(addRefDependencyInClass0.getRequires().contains(addDependency));
-
assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
} else {
@@ -156,24 +147,16 @@ public class AddUsageTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefDependencyInClass0.getRequires().size()));
-
- assertSame(Integer.valueOf(3), Integer.valueOf(addDependency.getRequires().size()));
+ assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertTrue(addDependency.getRequires().contains(addRefDependencyInClass0));
assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
-
- assertNotNull(addRefClass0InDependency.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass0InDependency.getEquivalence()
- .getDifferences().size()));
- assertTrue(addRefClass0InDependency.getEquivalence().getDifferences().contains(
- addRefDependencyInClass0));
+ assertEquals(0, comparison.getEquivalences().size());
+ assertNull(addRefClass0InDependency.getEquivalence());
testIntersections(comparison);
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java
index dec729d99..0a808a474 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java
@@ -2,13 +2,11 @@ package org.eclipse.emf.compare.uml2.tests.implications;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -20,8 +18,8 @@ import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.uml2.uml.UMLPackage;
@@ -30,7 +28,7 @@ import org.junit.Test;
@SuppressWarnings("nls")
public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
- private static final int NB_DIFFS = 11;
+ private static final int NB_DIFFS = 9;
private ImplicationsInputData input = new ImplicationsInputData();
@@ -41,11 +39,9 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
Predicate<? super Diff> addClientInInterfaceRealizationDescription = null;
Predicate<? super Diff> addSupplierInInterfaceRealizationDescription = null;
Predicate<? super Diff> addContractInInterfaceRealizationDescription = null;
- Predicate<? super Diff> addClientDependencyInClass0Description = null;
Predicate<? super Diff> addSubstitutionDescription = null;
Predicate<? super Diff> addClientInSubstitutionDescription = null;
Predicate<? super Diff> addSupplierInSubstitutionDescription = null;
- Predicate<? super Diff> addClientDependencyInClass0Description2 = null;
Predicate<? super Diff> addUMLInterfaceRealizationDescription = null;
Predicate<? super Diff> addUMLSubstitutionDescription = null;
@@ -58,16 +54,12 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
"model.Class0.InterfaceRealization0", "supplier", "model.Interface0");
addContractInInterfaceRealizationDescription = changedReference(
"model.Class0.InterfaceRealization0", "contract", "model.Interface0", null);
- addClientDependencyInClass0Description = removedFromReference("model.Class0", "clientDependency",
- "model.Class0.InterfaceRealization0");
addSubstitutionDescription = removedFromReference("model.Class0", "substitution",
"model.Class0.substitution1");
addClientInSubstitutionDescription = removedFromReference("model.Class0.substitution1", "client",
"model.Class0");
addSupplierInSubstitutionDescription = removedFromReference("model.Class0.substitution1",
"supplier", "model.Interface0");
- addClientDependencyInClass0Description2 = removedFromReference("model.Class0",
- "clientDependency", "model.Class0.substitution1");
} else {
addInterfaceRealizationDescription = addedToReference(
"model.Class0", "interfaceRealization", "model.Class0.InterfaceRealization0"); //$NON-NLS-1$
@@ -77,16 +69,12 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
"model.Class0.InterfaceRealization0", "supplier", "model.Interface0");
addContractInInterfaceRealizationDescription = changedReference(
"model.Class0.InterfaceRealization0", "contract", null, "model.Interface0");
- addClientDependencyInClass0Description = addedToReference("model.Class0", "clientDependency",
- "model.Class0.InterfaceRealization0");
addSubstitutionDescription = addedToReference("model.Class0", "substitution",
"model.Class0.substitution1");
addClientInSubstitutionDescription = addedToReference("model.Class0.substitution1", "client",
"model.Class0");
addSupplierInSubstitutionDescription = addedToReference("model.Class0.substitution1", "supplier",
"model.Interface0");
- addClientDependencyInClass0Description2 = addedToReference("model.Class0", "clientDependency",
- "model.Class0.substitution1");
}
DiffsOfInterest diffs = new DiffsOfInterest();
@@ -98,15 +86,11 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
addSupplierInInterfaceRealizationDescription, null);
diffs.addContractInInterfaceRealization = Iterators.find(differences.iterator(),
addContractInInterfaceRealizationDescription, null);
- diffs.addClientDependencyInClass0 = Iterators.find(differences.iterator(),
- addClientDependencyInClass0Description, null);
diffs.addSubstitution = Iterators.find(differences.iterator(), addSubstitutionDescription, null);
diffs.addClientInSubstitution = Iterators.find(differences.iterator(),
addClientInSubstitutionDescription, null);
diffs.addSupplierInSubstitution = Iterators.find(differences.iterator(),
addSupplierInSubstitutionDescription, null);
- diffs.addClientDependencyInClass02 = Iterators.find(differences.iterator(),
- addClientDependencyInClass0Description2, null);
diffs.addUMLInterfaceRealization = Iterators.find(differences.iterator(), and(
instanceOf(DirectedRelationshipChange.class),
discriminantInstanceOf(UMLPackage.Literals.INTERFACE_REALIZATION)), null);
@@ -165,10 +149,9 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
private void checkMergeAddClientInInterfaceRealization(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 4, comparison.getDifferences().size());
+ assertEquals(NB_DIFFS - 3, comparison.getDifferences().size());
assertNull(diffs.addClientInInterfaceRealization);
assertNull(diffs.addInterfaceRealization);
- assertNull(diffs.addClientDependencyInClass0);
assertNull(diffs.addUMLInterfaceRealization);
}
@@ -211,83 +194,7 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
private void checkMergeDeleteClientInInterfaceRealization(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 6, comparison.getDifferences().size());
- assertNull(diffs.addClientInInterfaceRealization);
- assertNull(diffs.addClientDependencyInClass0);
- assertNull(diffs.addInterfaceRealization);
- assertNull(diffs.addSupplierInInterfaceRealization);
- assertNull(diffs.addContractInInterfaceRealization);
- assertNull(diffs.addUMLInterfaceRealization);
- }
-
- @Test
- public void testA10MergeLtR2UseCase() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- private void checkMergeAddClientDependencyInClass0(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 4, comparison.getDifferences().size());
- assertNull(diffs.addClientDependencyInClass0);
- assertNull(diffs.addClientInInterfaceRealization);
- assertNull(diffs.addInterfaceRealization);
- assertNull(diffs.addUMLInterfaceRealization);
- }
-
- @Test
- public void testA10MergeLtR2UseCase3way1() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA10MergeLtR2UseCase3way2() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right, left);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- private void checkMergeDeleteClientDependencyInClass0(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 6, comparison.getDifferences().size());
- assertNull(diffs.addClientDependencyInClass0);
+ assertEquals(NB_DIFFS - 5, comparison.getDifferences().size());
assertNull(diffs.addClientInInterfaceRealization);
assertNull(diffs.addInterfaceRealization);
assertNull(diffs.addSupplierInInterfaceRealization);
@@ -315,9 +222,8 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
private void checkMergeAddInterfaceRealization(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 4, comparison.getDifferences().size());
+ assertEquals(NB_DIFFS - 3, comparison.getDifferences().size());
assertNull(diffs.addInterfaceRealization);
- assertNull(diffs.addClientDependencyInClass0);
assertNull(diffs.addClientInInterfaceRealization);
assertNull(diffs.addUMLInterfaceRealization);
}
@@ -361,12 +267,11 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
private void checkMergeDeleteInterfaceRealization(Comparison comparison, DiffsOfInterest diffs) {
- assertEquals(NB_DIFFS - 6, comparison.getDifferences().size());
+ assertEquals(NB_DIFFS - 5, comparison.getDifferences().size());
assertNull(diffs.addInterfaceRealization);
assertNull(diffs.addClientInInterfaceRealization);
assertNull(diffs.addSupplierInInterfaceRealization);
assertNull(diffs.addContractInInterfaceRealization);
- assertNull(diffs.addClientDependencyInClass0);
assertNull(diffs.addUMLInterfaceRealization);
}
@@ -428,63 +333,6 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
@Test
- public void testA10MergeRtL2UseCase() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA10MergeRtL2UseCase3way1() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA10MergeRtL2UseCase3way2() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right, left);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.ADD);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.ADD);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
public void testA10MergeRtL3UseCase() throws IOException {
final Resource left = input.getA3Left();
final Resource right = input.getA3Right();
@@ -628,63 +476,6 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
@Test
- public void testA11MergeLtR2UseCase() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA11MergeLtR2UseCase3way1() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA11MergeLtR2UseCase3way2() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right, left);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyLeftToRight(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
public void testA11MergeLtR3UseCase() throws IOException {
final Resource left = input.getA3Right();
final Resource right = input.getA3Left();
@@ -799,63 +590,6 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
}
@Test
- public void testA11MergeRtL2UseCase() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA11MergeRtL2UseCase3way1() throws IOException {
- final Resource left = input.getA3Right();
- final Resource right = input.getA3Left();
-
- Comparison comparison = compare(left, right, right);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeAddClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
- public void testA11MergeRtL2UseCase3way2() throws IOException {
- final Resource left = input.getA3Left();
- final Resource right = input.getA3Right();
-
- Comparison comparison = compare(left, right, left);
-
- DiffsOfInterest diffs = getDiffs(comparison, TestKind.DELETE);
-
- // ** MERGE **
- getMergerRegistry().getHighestRankingMerger(diffs.addClientDependencyInClass0).copyRightToLeft(
- diffs.addClientDependencyInClass0, new BasicMonitor());
-
- comparison = compare(left, right);
- diffs = getDiffs(comparison, TestKind.DELETE);
-
- checkMergeDeleteClientDependencyInClass0(comparison, diffs);
- }
-
- @Test
public void testA11MergeRtL3UseCase() throws IOException {
final Resource left = input.getA3Right();
final Resource right = input.getA3Left();
@@ -915,22 +649,16 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(NB_DIFFS), Integer.valueOf(differences.size()));
+ assertEquals(NB_DIFFS, differences.size());
DiffsOfInterest diffs = getDiffs(comparison, kind);
if (kind.equals(TestKind.DELETE)) {
- assertEquals(1, diffs.addClientDependencyInClass0.getImplies().size());
- assertTrue(diffs.addClientDependencyInClass0.getImplies().contains(diffs.addInterfaceRealization));
-
- assertEquals(1, diffs.addClientDependencyInClass02.getImplies().size());
- assertTrue(diffs.addClientDependencyInClass02.getImplies().contains(diffs.addSubstitution));
+ // there were tests for UML4, no longer valid for 5.0 with clientDependency being
+ // marked as derived.
} else {
- assertEquals(1, diffs.addInterfaceRealization.getImplies().size());
- assertTrue(diffs.addInterfaceRealization.getImplies().contains(diffs.addClientDependencyInClass0));
-
- assertEquals(1, diffs.addSubstitution.getImplies().size());
- assertTrue(diffs.addSubstitution.getImplies().contains(diffs.addClientDependencyInClass02));
+ assertEquals(0, diffs.addInterfaceRealization.getImplies().size());
+ assertEquals(0, diffs.addSubstitution.getImplies().size());
}
assertEquals(0, diffs.addClientInInterfaceRealization.getImplies().size());
assertEquals(0, diffs.addClientInSubstitution.getImplies().size());
@@ -951,16 +679,12 @@ public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
public Diff addContractInInterfaceRealization;
- public Diff addClientDependencyInClass0;
-
public Diff addSubstitution;
public Diff addClientInSubstitution;
public Diff addSupplierInSubstitution;
- public Diff addClientDependencyInClass02;
-
public Diff addUMLInterfaceRealization;
public Diff addUMLSubstitution;
diff --git a/plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF
index 2a63edfea..f01556bca 100644
--- a/plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.uml2.uml;bundle-version="5.0.0",
org.eclipse.emf.compare
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.emf.compare.uml2.internal.UMLComparePlugin

Back to the top