Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Notot2013-07-26 04:35:18 -0400
committerGerrit Code Review @ Eclipse.org2013-07-31 02:18:05 -0400
commitbab5bbc99b266cc404b3928b0a312c61c16a0f51 (patch)
tree0fef6d17d2fb416f0f4cead9af2c477af8b825e1 /plugins/org.eclipse.emf.compare.uml2.tests
parent7c98632917a4f62db46ab9aa98976ea28a80cbe3 (diff)
downloadorg.eclipse.emf.compare-bab5bbc99b266cc404b3928b0a312c61c16a0f51.tar.gz
org.eclipse.emf.compare-bab5bbc99b266cc404b3928b0a312c61c16a0f51.tar.xz
org.eclipse.emf.compare-bab5bbc99b266cc404b3928b0a312c61c16a0f51.zip
Detection of change of profile version.
For UML dynamic models, we checks we have the same profile version between the 2 sides. For that, we compares the URI (fragment) of the generated EPackage (in the profile) referenced from each profile application. If it is different, then the profile application bases on a different profile definition and a RuntimeException is thrown. To test this, a refactoring of the UML test framework was needed to correctly initialize JUnit tests with the registration of the EPackage (profile) and the map to find the profile location from this EPackage in static cases and not to do that in dynamic cases. The end-user is warned from the profile version difference by a message dialog. Change-Id: I67e7ef8b90aca100440818bcf76ef87cfd036be9
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml73
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractDynamicProfileTest.java43
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractStaticProfileTest.java38
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLInputData.java (renamed from plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/ProfilesInputData.java)57
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLProfileTest.java42
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java (renamed from plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractTest.java)59
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/EMFCompareUML2TestsPlugin.java10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/data/AssociationInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/data/DependencyInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/data/ExecutionSpecificationInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/data/ExtendInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/data/GeneralizationSetInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsInterfaceRealizationTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/data/ImplicationsInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/data/IncludeInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/data/MessageInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java (renamed from plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/ProfileTest.java)191
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java247
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/DynamicProfileInputData.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/left.uml10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/right.uml10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/static_/StaticProfileInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java20
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java20
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/static_/StaticStereotypeInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/data/TimeConstraintInputData.java4
50 files changed, 727 insertions, 351 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml
index 33f819844..f27ff1595 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml
@@ -2,6 +2,50 @@
<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:Profile xmi:id="_hZFTgIwkEeC_FYHMbTTxXw" name="UML2CompareTestProfile" metaclassReference="_gHJYQIwpEeC_FYHMbTTxXw">
<eAnnotations xmi:id="_DL47UCjtEeKqNZFxtZ0S6g" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_OuZDgPCCEeKBcNH8cCNzUg" name="uml2comparetestprofile" nsURI="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" nsPrefix="testProfile">
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_OuZDgfCCEeKBcNH8cCNzUg" name="ACliche">
+ <eAnnotations xmi:id="_OuZDgvCCEeKBcNH8cCNzUg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_wQjhQIwoEeC_FYHMbTTxXw"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_OuZDg_CCEeKBcNH8cCNzUg" name="singleValuedAttribute" ordered="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_OuZDhfCCEeKBcNH8cCNzUg" name="manyValuedAttribute" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDh_CCEeKBcNH8cCNzUg" name="singleValuedReference" ordered="false">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDifCCEeKBcNH8cCNzUg" name="manyValuedReference" upperBound="-1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDi_CCEeKBcNH8cCNzUg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_OuZDjfCCEeKBcNH8cCNzUg" name="ACliche2">
+ <eAnnotations xmi:id="_OuZDjvCCEeKBcNH8cCNzUg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_x0pRAPCBEeKBcNH8cCNzUg"/>
+ <eAnnotations xmi:id="_OuZDj_CCEeKBcNH8cCNzUg" source="duplicates">
+ <contents xmi:type="ecore:EReference" xmi:id="_OuZDkPCCEeKBcNH8cCNzUg" name="base_Class" ordered="false" lowerBound="1">
+ <eAnnotations xmi:id="_OuZDkfCCEeKBcNH8cCNzUg" source="redefines" references="_OuZDm_CCEeKBcNH8cCNzUg"/>
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </contents>
+ </eAnnotations>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_OuZDk_CCEeKBcNH8cCNzUg" name="singleValuedAttribute" ordered="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_OuZDlfCCEeKBcNH8cCNzUg" name="manyValuedAttribute" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDl_CCEeKBcNH8cCNzUg" name="singleValuedReference" ordered="false">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDmfCCEeKBcNH8cCNzUg" name="manyValuedReference" upperBound="-1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_OuZDm_CCEeKBcNH8cCNzUg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
<contents xmi:type="ecore:EPackage" xmi:id="_DL_B8CjtEeKqNZFxtZ0S6g" name="uml2comparetestprofile" nsURI="http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile" nsPrefix="testProfile">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_DL_B8SjtEeKqNZFxtZ0S6g" name="ACliche">
<eAnnotations xmi:id="_DL_B8ijtEeKqNZFxtZ0S6g" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_wQjhQIwoEeC_FYHMbTTxXw"/>
@@ -52,6 +96,35 @@
<packagedElement xmi:type="uml:Extension" xmi:id="_hQCS8IwpEeC_FYHMbTTxXw" name="Class_ACliche" memberEnd="_hQCS8YwpEeC_FYHMbTTxXw _hQCS8owpEeC_FYHMbTTxXw">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_hQCS8YwpEeC_FYHMbTTxXw" name="extension_ACliche" type="_wQjhQIwoEeC_FYHMbTTxXw" aggregation="composite" association="_hQCS8IwpEeC_FYHMbTTxXw"/>
</packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_x0pRAPCBEeKBcNH8cCNzUg" name="ACliche2">
+ <ownedAttribute xmi:id="_x0pRAfCBEeKBcNH8cCNzUg" name="singleValuedAttribute">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x0pRAvCBEeKBcNH8cCNzUg"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_x0pRA_CBEeKBcNH8cCNzUg" name="manyValuedAttribute" isOrdered="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x0pRBPCBEeKBcNH8cCNzUg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_x0pRBfCBEeKBcNH8cCNzUg" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_x0pRBvCBEeKBcNH8cCNzUg" name="singleValuedReference">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x0pRB_CBEeKBcNH8cCNzUg"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_x0pRCPCBEeKBcNH8cCNzUg" name="manyValuedReference" isOrdered="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x0pRCfCBEeKBcNH8cCNzUg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_x0pRCvCBEeKBcNH8cCNzUg" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_x0pRC_CBEeKBcNH8cCNzUg" name="base_Class">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_J3SKoPCCEeKBcNH8cCNzUg" name="base_Class" association="_J3OgQPCCEeKBcNH8cCNzUg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_J3OgQPCCEeKBcNH8cCNzUg" name="Class_ACliche2" memberEnd="_J3RjkPCCEeKBcNH8cCNzUg _J3SKoPCCEeKBcNH8cCNzUg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_J3RjkPCCEeKBcNH8cCNzUg" name="extension_ACliche2" type="_x0pRAPCBEeKBcNH8cCNzUg" aggregation="composite" association="_J3OgQPCCEeKBcNH8cCNzUg"/>
+ </packagedElement>
<profileApplication xmi:id="_zXVhcIwnEeC_FYHMbTTxXw">
<eAnnotations xmi:id="_zXXWoIwnEeC_FYHMbTTxXw" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractDynamicProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractDynamicProfileTest.java
new file mode 100644
index 000000000..bcda76055
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractDynamicProfileTest.java
@@ -0,0 +1,43 @@
+package org.eclipse.emf.compare.uml2.tests;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.uml2.uml.UMLPlugin;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class AbstractDynamicProfileTest extends AbstractUMLProfileTest {
+
+ static URI registeredURI;
+
+ static Object registeredPackage;
+
+ @BeforeClass
+ public static void initEPackageNsURIToProfileLocationMap() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ // It is required to link the EPackage to the UML package of the UML Profile
+ UMLPlugin
+ .getEPackageNsURIToProfileLocationMap()
+ .put("http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile",
+ URI.createURI("pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_hZFTgIwkEeC_FYHMbTTxXw")); //$NON-NLS-1$
+ } else {
+ registeredURI = UMLPlugin.getEPackageNsURIToProfileLocationMap().remove(
+ UML2CompareTestProfilePackage.eNS_URI);
+ registeredPackage = EPackage.Registry.INSTANCE.remove(UML2CompareTestProfilePackage.eNS_URI);
+ }
+ }
+
+ @AfterClass
+ public static void resetEPackageNsURIToProfileLocationMap() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ UMLPlugin.getEPackageNsURIToProfileLocationMap().remove(
+ "http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile");
+ } else {
+ UMLPlugin.getEPackageNsURIToProfileLocationMap().put(UML2CompareTestProfilePackage.eNS_URI,
+ registeredURI);
+ EPackage.Registry.INSTANCE.put(UML2CompareTestProfilePackage.eNS_URI, registeredPackage);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractStaticProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractStaticProfileTest.java
new file mode 100644
index 000000000..d3fc02acd
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractStaticProfileTest.java
@@ -0,0 +1,38 @@
+package org.eclipse.emf.compare.uml2.tests;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.uml2.uml.UMLPlugin;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class AbstractStaticProfileTest extends AbstractUMLProfileTest {
+
+ @BeforeClass
+ public static void fillRegistriesForStatic() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ EPackage.Registry.INSTANCE.put(UML2CompareTestProfilePackage.eNS_URI,
+ UML2CompareTestProfilePackage.eINSTANCE); // registers
+ // against
+ // EPackage.Registry
+ // It is required to link the EPackage to the UML package of the UML Profile
+ 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$
+ }
+ }
+
+ @AfterClass
+ public static void resetRegistriesForStatic() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ UMLPlugin.getEPackageNsURIToProfileLocationMap().remove(UML2CompareTestProfilePackage.eNS_URI);
+ EPackage.Registry.INSTANCE.remove(UML2CompareTestProfilePackage.eNS_URI);
+ }
+ }
+}
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/AbstractUMLInputData.java
index 455a543c9..11e8abcc2 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/AbstractUMLInputData.java
@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) 2013 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
package org.eclipse.emf.compare.uml2.tests;
import java.io.IOException;
@@ -11,20 +21,20 @@ 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.URIConverter;
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;
-@SuppressWarnings("nls")
-public class ProfilesInputData extends AbstractInputData {
-
+/**
+ * Implementations of this class can be used to load models from the class' class loader.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+public abstract class AbstractUMLInputData extends AbstractInputData {
/** Store the set of the resource sets of the input data. */
private Set<ResourceSet> sets = new LinkedHashSet<ResourceSet>();
@@ -40,49 +50,26 @@ public class ProfilesInputData extends AbstractInputData {
final URI uri = URI.createURI(fileURL.toString());
ResourceSet resourceSet = new ResourceSetImpl();
- sets.add(resourceSet);
-
- if (!EMFPlugin.IS_RESOURCES_BUNDLE_AVAILABLE) {
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("ecore",
- new EcoreResourceFactoryImpl());
- resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
- resourceSet.getPackageRegistry().put(UML2CompareTestProfilePackage.eNS_URI,
- UML2CompareTestProfilePackage.eINSTANCE);
+ getSets().add(resourceSet);
+ // Standalone
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
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$
-
+ // override wrong pathmap mapping in UMLResourcesUtil
final URL UMLJarredFileLocation = ResourcesPlugin.class.getResource("ResourcesPlugin.class");
String UMLJarPath = UMLJarredFileLocation.toString();
UMLJarPath = UMLJarPath.substring(0, UMLJarPath.indexOf('!'));
- final String thisNamespace = "org.eclipse.emf.compare.uml2.tests";
- final URL thisClassLocation = this.getClass().getResource(
- this.getClass().getSimpleName() + ".class");
- String staticProfilePath = thisClassLocation.toString();
- staticProfilePath = staticProfilePath.substring(0, staticProfilePath.indexOf(thisNamespace)
- + thisNamespace.length());
- staticProfilePath += "/model/";
-
- final Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
+ final Map<URI, URI> uriMap = URIConverter.URI_MAP;
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), URI.createURI(UMLJarPath
+ "!/libraries/"));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), URI.createURI(UMLJarPath
+ "!/metamodels/"));
uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP), URI.createURI(UMLJarPath + "!/profiles/"));
- uriMap.put(URI.createURI("pathmap://UML_COMPARE_TESTS_PROFILE/"), URI
- .createURI(staticProfilePath));
-
}
Resource resource = resourceSet.createResource(uri);
-
resource.load(str, Collections.emptyMap());
str.close();
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLProfileTest.java
new file mode 100644
index 000000000..b0d94475f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLProfileTest.java
@@ -0,0 +1,42 @@
+package org.eclipse.emf.compare.uml2.tests;
+
+import java.net.URL;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.uml2.uml.resources.ResourcesPlugin;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class AbstractUMLProfileTest extends AbstractUMLTest {
+
+ @BeforeClass
+ public static void addProfilePathmap() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ final URL UMLJarredFileLocation = ResourcesPlugin.class.getResource("ResourcesPlugin.class");
+ String UMLJarPath = UMLJarredFileLocation.toString();
+ UMLJarPath = UMLJarPath.substring(0, UMLJarPath.indexOf('!'));
+ URIConverter.URI_MAP.put(URI.createURI("pathmap://UML_COMPARE_TESTS_PROFILE/"), URI
+ .createURI(getProfilePath()));
+ }
+ }
+
+ @AfterClass
+ public static void resetProfilePathmap() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ URIConverter.URI_MAP.remove(URI.createURI("pathmap://UML_COMPARE_TESTS_PROFILE/"));
+ }
+ }
+
+ protected static String getProfilePath() {
+ final String thisNamespace = "org.eclipse.emf.compare.uml2.tests";
+ final URL thisClassLocation = AbstractUMLProfileTest.class.getResource(AbstractUMLProfileTest.class
+ .getSimpleName()
+ + ".class");
+ String profilePath = thisClassLocation.toString();
+ profilePath = profilePath.substring(0, profilePath.indexOf(thisNamespace) + thisNamespace.length());
+ profilePath += "/model/";
+ return profilePath;
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
index 69d25997f..8a1a8d35e 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
@@ -21,6 +21,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
+import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.common.util.EList;
@@ -29,6 +30,7 @@ import org.eclipse.emf.compare.ComparePackage;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.EMFCompare;
+import org.eclipse.emf.compare.EMFCompare.Builder;
import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.merge.BatchMerger;
import org.eclipse.emf.compare.merge.IBatchMerger;
@@ -37,23 +39,31 @@ import org.eclipse.emf.compare.postprocessor.IPostProcessor;
import org.eclipse.emf.compare.postprocessor.PostProcessorDescriptorRegistryImpl;
import org.eclipse.emf.compare.scope.DefaultComparisonScope;
import org.eclipse.emf.compare.scope.IComparisonScope;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.tests.postprocess.data.TestPostProcessor;
import org.eclipse.emf.compare.uml2.internal.UMLDiff;
import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger;
import org.eclipse.emf.compare.uml2.internal.postprocessor.UMLPostProcessor;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
import org.eclipse.emf.compare.utils.ReferenceUtil;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
+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.xmi.impl.EcoreResourceFactoryImpl;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl;
+import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
+/**
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
@SuppressWarnings("nls")
-public abstract class AbstractTest {
+public abstract class AbstractUMLTest {
private EMFCompare emfCompare;
@@ -61,25 +71,58 @@ public abstract class AbstractTest {
@BeforeClass
public static void fillRegistries() {
- EPackage.Registry.INSTANCE.put(ComparePackage.eNS_URI, ComparePackage.eINSTANCE);
- EPackage.Registry.INSTANCE.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
+ EPackage.Registry.INSTANCE.put(ComparePackage.eNS_URI, ComparePackage.eINSTANCE);
+ EPackage.Registry.INSTANCE.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
+
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore",
+ new EcoreResourceFactoryImpl());
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("uml", //$NON-NLS-1$
+ new UMLResourceFactoryImpl());
+ }
+ }
+
+ @AfterClass
+ public static void resetRegistries() {
+ if (!EMFPlugin.IS_ECLIPSE_RUNNING) {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().remove("uml");
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().remove("ecore");
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("uml", //$NON-NLS-1$
- new UMLResourceFactoryImpl());
+ EPackage.Registry.INSTANCE.remove(UML2CompareTestProfilePackage.eNS_URI);
+ EPackage.Registry.INSTANCE.remove(ComparePackage.eNS_URI);
+ EPackage.Registry.INSTANCE.remove(EcorePackage.eNS_URI);
+ }
}
@Before
public void before() {
+ Builder builder = EMFCompare.builder();
+ // post-processor and merger registry is not filled in runtime (org.eclipse.emf.compare.rcp not
+ // loaded)
final IPostProcessor.Descriptor.Registry<String> postProcessorRegistry = new PostProcessorDescriptorRegistryImpl<String>();
postProcessorRegistry.put(UMLPostProcessor.class.getName(),
new TestPostProcessor.TestPostProcessorDescriptor(Pattern
.compile("http://www.eclipse.org/uml2/\\d\\.0\\.0/UML"), null,
new UMLPostProcessor(), 20));
- emfCompare = EMFCompare.builder().setPostProcessorRegistry(postProcessorRegistry).build();
+ builder.setPostProcessorRegistry(postProcessorRegistry);
mergerRegistry = IMerger.RegistryImpl.createStandaloneInstance();
final IMerger umlMerger = new UMLMerger();
umlMerger.setRanking(11);
mergerRegistry.add(umlMerger);
+ emfCompare = builder.build();
+ }
+
+ @After
+ public void cleanup() {
+ for (ResourceSet set : getInput().getSets()) {
+ for (Resource res : set.getResources()) {
+ res.unload();
+ }
+ set.getResources().clear();
+ }
+ getInput().getSets().clear();
+
}
protected EMFCompare getCompare() {
@@ -155,7 +198,7 @@ public abstract class AbstractTest {
};
}
- protected abstract AbstractInputData getInput();
+ protected abstract AbstractUMLInputData getInput();
protected void testMergeLeftToRight(Notifier left, Notifier right, Notifier origin) {
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/EMFCompareUML2TestsPlugin.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/EMFCompareUML2TestsPlugin.java
index fff799038..64134c571 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/EMFCompareUML2TestsPlugin.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/EMFCompareUML2TestsPlugin.java
@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) 2013 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
package org.eclipse.emf.compare.uml2.tests;
import org.osgi.framework.BundleActivator;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
index b773db30f..a16d10e19 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
@@ -23,15 +23,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddAssociation2Test extends AbstractTest {
+public class AddAssociation2Test extends AbstractUMLTest {
private AssociationInputData input = new AssociationInputData();
@@ -368,7 +368,7 @@ public class AddAssociation2Test extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
index 078f14e6d..353429e45 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
@@ -23,15 +23,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddAssociation3Test extends AbstractTest {
+public class AddAssociation3Test extends AbstractUMLTest {
private AssociationInputData input = new AssociationInputData();
@@ -368,7 +368,7 @@ public class AddAssociation3Test extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
index 5e2aa873e..8145129ae 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
@@ -23,15 +23,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddAssociationTest extends AbstractTest {
+public class AddAssociationTest extends AbstractUMLTest {
private AssociationInputData input = new AssociationInputData();
@@ -383,7 +383,7 @@ public class AddAssociationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
index c608a1d58..20f1b8902 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
@@ -22,15 +22,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ChangeAssociationTest extends AbstractTest {
+public class ChangeAssociationTest extends AbstractUMLTest {
private AssociationInputData input = new AssociationInputData();
@@ -258,7 +258,7 @@ public class ChangeAssociationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/data/AssociationInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/data/AssociationInputData.java
index b79e43769..bc1e1aa5b 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/data/AssociationInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/data/AssociationInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.association.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class AssociationInputData extends AbstractInputData {
+public class AssociationInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
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 d0eebaa76..fb4b34686 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
@@ -20,16 +20,16 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
// TODO To extend from AddDependencyTest and change only descriptions.
@SuppressWarnings("nls")
-public class AddAbstractionTest extends AbstractTest {
+public class AddAbstractionTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -182,7 +182,7 @@ public class AddAbstractionTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
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 56ba3948e..4a402dec6 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
@@ -20,15 +20,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddDependencyTest extends AbstractTest {
+public class AddDependencyTest extends AbstractUMLTest {
protected DependencyInputData input = new DependencyInputData();
@@ -181,7 +181,7 @@ public class AddDependencyTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
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 f5125f0d4..acaf4f593 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
@@ -19,15 +19,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddInterfaceRealizationTest extends AbstractTest {
+public class AddInterfaceRealizationTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -198,7 +198,7 @@ public class AddInterfaceRealizationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
}
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 924b2b4ca..47f3f1a12 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
@@ -20,16 +20,16 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
//TODO To extend from AddDependencyTest and change only descriptions.
@SuppressWarnings("nls")
-public class AddRealizationTest extends AbstractTest {
+public class AddRealizationTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -182,7 +182,7 @@ public class AddRealizationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
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 d4e6fa8ee..f0bd135b5 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
@@ -19,9 +19,9 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -29,7 +29,7 @@ import org.junit.Test;
//TODO To extend from AddInterfaceRealizationTest and change only descriptions.
@SuppressWarnings("nls")
-public class AddSubstitutionTest extends AbstractTest {
+public class AddSubstitutionTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -198,7 +198,7 @@ public class AddSubstitutionTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
}
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 f130220fe..44b7ec1f1 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
@@ -20,16 +20,16 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
//TODO To extend from ChangeDependencyTest and change only descriptions.
@SuppressWarnings("nls")
-public class AddUsageTest extends AbstractTest {
+public class AddUsageTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -179,7 +179,7 @@ public class AddUsageTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
index 39e58aba4..ea496ed0b 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
@@ -18,15 +18,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ChangeDependencyTest extends AbstractTest {
+public class ChangeDependencyTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -120,7 +120,7 @@ public class ChangeDependencyTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
index 875910398..2d389eea9 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
@@ -18,16 +18,16 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
//TODO To extend from ChangeDependencyTest and change only descriptions.
@SuppressWarnings("nls")
-public class ChangeUsageTest extends AbstractTest {
+public class ChangeUsageTest extends AbstractUMLTest {
private DependencyInputData input = new DependencyInputData();
@@ -120,7 +120,7 @@ public class ChangeUsageTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/data/DependencyInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/data/DependencyInputData.java
index e096a109e..548a64827 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/data/DependencyInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/data/DependencyInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.dependency.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class DependencyInputData extends AbstractInputData {
+public class DependencyInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
index 6c8c1e1f7..e0e689fbc 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
@@ -21,15 +21,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ExecutionSpecificationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.executionSpecification.data.ExecutionSpecificationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddActionExecutionSpecificationTest extends AbstractTest {
+public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
private ExecutionSpecificationInputData input = new ExecutionSpecificationInputData();
@@ -326,7 +326,7 @@ public class AddActionExecutionSpecificationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
index b4213ae5c..34d66ba3d 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
@@ -21,15 +21,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ExecutionSpecificationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.executionSpecification.data.ExecutionSpecificationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddBehaviorExecutionSpecificationTest extends AbstractTest {
+public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
private ExecutionSpecificationInputData input = new ExecutionSpecificationInputData();
@@ -326,7 +326,7 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/data/ExecutionSpecificationInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/data/ExecutionSpecificationInputData.java
index f8fb325ed..65d3b0d76 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/data/ExecutionSpecificationInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/data/ExecutionSpecificationInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.executionSpecification.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class ExecutionSpecificationInputData extends AbstractInputData {
+public class ExecutionSpecificationInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
index fb27d92bf..af991bb86 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
@@ -21,15 +21,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ExtendChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.extend.data.ExtendInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddExtendTest extends AbstractTest {
+public class AddExtendTest extends AbstractUMLTest {
private ExtendInputData input = new ExtendInputData();
@@ -170,7 +170,7 @@ public class AddExtendTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/data/ExtendInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/data/ExtendInputData.java
index 06423edd4..de8f2b608 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/data/ExtendInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/data/ExtendInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.extend.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class ExtendInputData extends AbstractInputData {
+public class ExtendInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
index 7dcb560e8..e0fd5b3aa 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
@@ -20,9 +20,9 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.GeneralizationSetChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.generalizationSet.data.GeneralizationSetInputData;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
@@ -30,7 +30,7 @@ import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddGeneralizationSetTest extends AbstractTest {
+public class AddGeneralizationSetTest extends AbstractUMLTest {
private GeneralizationSetInputData input = new GeneralizationSetInputData();
@@ -253,7 +253,7 @@ public class AddGeneralizationSetTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/data/GeneralizationSetInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/data/GeneralizationSetInputData.java
index 218ec125a..af5e57ee1 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/data/GeneralizationSetInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/data/GeneralizationSetInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.generalizationSet.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class GeneralizationSetInputData extends AbstractInputData {
+public class GeneralizationSetInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
index d92cf52e6..b6e430be7 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
@@ -25,15 +25,15 @@ import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ImplicationsAssociationTest extends AbstractTest {
+public class ImplicationsAssociationTest extends AbstractUMLTest {
private static final int NB_DIFFS = 16;
@@ -980,7 +980,7 @@ public class ImplicationsAssociationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
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 6a5e87128..ec3e54390 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
@@ -19,16 +19,16 @@ import java.util.List;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ImplicationsInterfaceRealizationTest extends AbstractTest {
+public class ImplicationsInterfaceRealizationTest extends AbstractUMLTest {
private static final int NB_DIFFS = 11;
@@ -938,7 +938,7 @@ public class ImplicationsInterfaceRealizationTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
index df677a5bd..966f03a72 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
@@ -19,14 +19,14 @@ import java.util.List;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ImplicationsTransitionTest extends AbstractTest {
+public class ImplicationsTransitionTest extends AbstractUMLTest {
private static final int NB_DIFFS = 6;
@@ -885,7 +885,7 @@ public class ImplicationsTransitionTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/data/ImplicationsInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/data/ImplicationsInputData.java
index 05471387f..015443714 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/data/ImplicationsInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/data/ImplicationsInputData.java
@@ -2,13 +2,13 @@ package org.eclipse.emf.compare.uml2.tests.implications.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
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.uml2.uml.resources.util.UMLResourcesUtil;
-public class ImplicationsInputData extends AbstractInputData {
+public class ImplicationsInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml", createResourceSet()); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
index 479c8c0e9..dacd3ed67 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
@@ -19,15 +19,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.include.data.IncludeInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddIncludeTest extends AbstractTest {
+public class AddIncludeTest extends AbstractUMLTest {
private IncludeInputData input = new IncludeInputData();
@@ -144,7 +144,7 @@ public class AddIncludeTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/data/IncludeInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/data/IncludeInputData.java
index e2ff55ff2..4e5575497 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/data/IncludeInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/data/IncludeInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.include.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class IncludeInputData extends AbstractInputData {
+public class IncludeInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
index e8efa31bd..8eefbead5 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
@@ -26,16 +26,16 @@ 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.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.UMLDiff;
import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class ExtensionMergeTest extends AbstractTest {
+public class ExtensionMergeTest extends AbstractUMLTest {
private AssociationInputData input = new AssociationInputData();
@Test
@@ -49,7 +49,7 @@ public class ExtensionMergeTest extends AbstractTest {
/**
* {@inheritDoc}
*
- * @see org.eclipse.emf.compare.uml2.tests.AbstractTest#testMergeRightToLeft(org.eclipse.emf.common.notify.Notifier,
+ * @see org.eclipse.emf.compare.uml2.tests.AbstractUMLTest#testMergeRightToLeft(org.eclipse.emf.common.notify.Notifier,
* org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.common.notify.Notifier)
*/
@Override
@@ -82,7 +82,7 @@ public class ExtensionMergeTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
index 6e9a5c029..4a4975db8 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
@@ -25,15 +25,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.MessageChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.message.data.MessageInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddMessageTest extends AbstractTest {
+public class AddMessageTest extends AbstractUMLTest {
private MessageInputData input = new MessageInputData();
@@ -724,7 +724,7 @@ public class AddMessageTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/data/MessageInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/data/MessageInputData.java
index 80213f888..af2cc94b1 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/data/MessageInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/data/MessageInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.message.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class MessageInputData extends AbstractInputData {
+public class MessageInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/ProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java
index 77ae11f0e..fe0ed1fb3 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/ProfileTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java
@@ -18,145 +18,24 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.ReferenceChange;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractDynamicProfileTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.profiles.data.dynamic.DynamicProfileInputData;
-import org.eclipse.emf.compare.uml2.tests.profiles.data.static_.StaticProfileInputData;
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 ProfileTest extends AbstractTest {
+public class DynamicProfileTest extends AbstractDynamicProfileTest {
- private StaticProfileInputData staticInput = new StaticProfileInputData();
-
- private DynamicProfileInputData dynamicInput = new DynamicProfileInputData();
-
- @After
- public void cleanup() {
- for (ResourceSet set : staticInput.getSets()) {
- for (Resource res : set.getResources()) {
- res.unload();
- }
- set.getResources().clear();
- }
- for (ResourceSet set : dynamicInput.getSets()) {
- for (Resource res : set.getResources()) {
- res.unload();
- }
- set.getResources().clear();
- }
- }
-
- @Test
- public void testStaticA10UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Right();
-
- final Comparison comparison = compare(left, right);
- testAB1(TestKind.ADD, comparison);
- }
-
- @Test
- public void testMergeRtLStaticA10UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeRightToLeft(left, right, null);
- }
-
- @Test
- public void testMergeLtRStaticA10UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeLeftToRight(left, right, null);
- }
-
- @Test
- public void testStaticA11UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Right();
-
- final Comparison comparison = compare(right, left);
- testAB1(TestKind.DELETE, comparison);
- }
-
- @Test
- public void testMergeRtLStaticA11UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeRightToLeft(right, left, null);
- }
-
- @Test
- public void testMergeLtRStaticA11UseCase() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeLeftToRight(right, left, null);
- }
-
- @Test
- public void testStaticA10UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Right();
-
- final Comparison comparison = compare(left, right, right);
- testAB1(TestKind.ADD, comparison);
- }
-
- @Test
- public void testMergeRtLStaticA10UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeRightToLeft(left, right, right);
- }
-
- @Test
- public void testMergeLtRStaticA10UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeLeftToRight(left, right, right);
- }
-
- @Test
- public void testStaticA11UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Right();
-
- final Comparison comparison = compare(left, right, left);
- testAB1(TestKind.DELETE, comparison);
- }
-
- @Test
- public void testMergeRtLStaticA11UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeRightToLeft(left, right, right);
- }
-
- @Test
- public void testMergeLtRStaticA11UseCase3way() throws IOException {
- final Resource left = staticInput.getA1Left();
- final Resource right = staticInput.getA1Left();
-
- testMergeLeftToRight(left, right, right);
- }
+ private DynamicProfileInputData input = new DynamicProfileInputData();
@Test
public void testDynamicA10UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Right();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
final Comparison comparison = compare(left, right);
testAB1(TestKind.ADD, comparison);
@@ -164,24 +43,24 @@ public class ProfileTest extends AbstractTest {
@Test
public void testMergeRtLDynamicA10UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeRightToLeft(left, right, null);
}
@Test
public void testMergeLtRDynamicA10UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeLeftToRight(left, right, null);
}
@Test
public void testDynamicA11UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Right();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
final Comparison comparison = compare(right, left);
testAB1(TestKind.DELETE, comparison);
@@ -189,24 +68,24 @@ public class ProfileTest extends AbstractTest {
@Test
public void testMergeRtLDynamicA11UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeRightToLeft(right, left, null);
}
@Test
public void testMergeLtRDynamicA11UseCase() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeLeftToRight(right, left, null);
}
@Test
public void testDynamicA10UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Right();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
final Comparison comparison = compare(left, right, right);
testAB1(TestKind.ADD, comparison);
@@ -214,24 +93,24 @@ public class ProfileTest extends AbstractTest {
@Test
public void testMergeRtLDynamicA10UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeRightToLeft(left, right, right);
}
@Test
public void testMergeLtRDynamicA10UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeLeftToRight(left, right, right);
}
@Test
public void testDynamicA11UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Right();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
final Comparison comparison = compare(left, right, left);
testAB1(TestKind.DELETE, comparison);
@@ -239,20 +118,30 @@ public class ProfileTest extends AbstractTest {
@Test
public void testMergeRtLDynamicA11UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeRightToLeft(left, right, left);
}
@Test
public void testMergeLtRDynamicA11UseCase3way() throws IOException {
- final Resource left = dynamicInput.getA1Left();
- final Resource right = dynamicInput.getA1Left();
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
testMergeLeftToRight(left, right, left);
}
+ @Test
+ public void testA2UseCase() throws IOException {
+ final Resource left = input.getA2Left();
+ final Resource right = input.getA2Right();
+
+ final Comparison comparison = compare(left, right);
+
+ assertTrue(comparison.getDifferences().isEmpty());
+ }
+
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
@@ -361,8 +250,8 @@ public class ProfileTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
- return staticInput;
+ protected AbstractUMLInputData getInput() {
+ return input;
}
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java
new file mode 100644
index 000000000..ddccd4afe
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java
@@ -0,0 +1,247 @@
+package org.eclipse.emf.compare.uml2.tests.profiles;
+
+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.ofKind;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterators;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.ReferenceChange;
+import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
+import org.eclipse.emf.compare.uml2.tests.AbstractStaticProfileTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.profiles.data.static_.StaticProfileInputData;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+@SuppressWarnings("nls")
+public class StaticProfileTest extends AbstractStaticProfileTest {
+
+ private StaticProfileInputData input = new StaticProfileInputData();
+
+ @Test
+ public void testStaticA10UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ final Comparison comparison = compare(left, right);
+ testAB1(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testMergeRtLStaticA10UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeRightToLeft(left, right, null);
+ }
+
+ @Test
+ public void testMergeLtRStaticA10UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeLeftToRight(left, right, null);
+ }
+
+ @Test
+ public void testStaticA11UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ final Comparison comparison = compare(right, left);
+ testAB1(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testMergeRtLStaticA11UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeRightToLeft(right, left, null);
+ }
+
+ @Test
+ public void testMergeLtRStaticA11UseCase() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeLeftToRight(right, left, null);
+ }
+
+ @Test
+ public void testStaticA10UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ final Comparison comparison = compare(left, right, right);
+ testAB1(TestKind.ADD, comparison);
+ }
+
+ @Test
+ public void testMergeRtLStaticA10UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeRightToLeft(left, right, right);
+ }
+
+ @Test
+ public void testMergeLtRStaticA10UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeLeftToRight(left, right, right);
+ }
+
+ @Test
+ public void testStaticA11UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Right();
+
+ final Comparison comparison = compare(left, right, left);
+ testAB1(TestKind.DELETE, comparison);
+ }
+
+ @Test
+ public void testMergeRtLStaticA11UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeRightToLeft(left, right, right);
+ }
+
+ @Test
+ public void testMergeLtRStaticA11UseCase3way() throws IOException {
+ final Resource left = input.getA1Left();
+ final Resource right = input.getA1Left();
+
+ testMergeLeftToRight(left, right, right);
+ }
+
+ 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()));
+
+ Predicate<? super Diff> addProfileApplicationDescription = null;
+ Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
+ Predicate<? super Diff> addUMLAnnotationDescription = null;
+ Predicate<? super Diff> addReferencesInUMLAnnotationDescription = 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"));
+
+ 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);
+
+ assertNotNull(addProfileApplication);
+ assertNotNull(addAppliedProfileInProfileApplication);
+ assertNotNull(addUMLAnnotation);
+ assertNotNull(addReferencesInUMLAnnotation);
+
+ // CHECK EXTENSION
+ assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
+ Diff addUMLProfileApplication = null;
+ if (kind.equals(TestKind.ADD)) {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.ADD)));
+ } else {
+ addUMLProfileApplication = Iterators.find(differences.iterator(), and(
+ instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.DELETE)));
+ }
+ assertNotNull(addUMLProfileApplication);
+ assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
+ assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
+
+ // CHECK REQUIREMENT
+ assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ 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));
+
+ } 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()));
+ }
+
+ // CHECK EQUIVALENCE
+ assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+
+ testIntersections(comparison);
+
+ }
+
+ @Override
+ protected AbstractUMLInputData getInput() {
+ return input;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/DynamicProfileInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/DynamicProfileInputData.java
index 84ce63451..34570e89c 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/DynamicProfileInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/DynamicProfileInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.profiles.data.dynamic;
import java.io.IOException;
-import org.eclipse.emf.compare.uml2.tests.ProfilesInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class DynamicProfileInputData extends ProfilesInputData {
+public class DynamicProfileInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml");
@@ -14,4 +14,12 @@ public class DynamicProfileInputData extends ProfilesInputData {
public Resource getA1Right() throws IOException {
return loadFromClassLoader("a1/right.uml");
}
+
+ public Resource getA2Left() throws IOException {
+ return loadFromClassLoader("a2/left.uml");
+ }
+
+ public Resource getA2Right() throws IOException {
+ return loadFromClassLoader("a2/right.uml");
+ }
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/left.uml
new file mode 100644
index 000000000..332bd5f8a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/left.uml
@@ -0,0 +1,10 @@
+<?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="_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="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_OuZDgPCCEeKBcNH8cCNzUg"/>
+ </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/profiles/data/dynamic/a2/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/right.uml
new file mode 100644
index 000000000..9894c400f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/dynamic/a2/right.uml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model 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: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"/>
+ <profileApplication xmi:id="_WsrGcPNPEeG0ipjyqWM1zA">
+ <eAnnotations xmi:id="_WsrGcfNPEeG0ipjyqWM1zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_COMPARE_TESTS_PROFILE/uml2.compare.testprofile.profile.uml#_DL_B8CjtEeKqNZFxtZ0S6g"/>
+ </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/profiles/data/static_/StaticProfileInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/static_/StaticProfileInputData.java
index fe5217c89..084a3b130 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/static_/StaticProfileInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/data/static_/StaticProfileInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.profiles.data.static_;
import java.io.IOException;
-import org.eclipse.emf.compare.uml2.tests.ProfilesInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class StaticProfileInputData extends ProfilesInputData {
+public class StaticProfileInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
index 93f56c2c0..df9b0639a 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
@@ -24,33 +24,21 @@ import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.ResourceAttachmentChange;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractDynamicProfileTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.stereotypes.data.dynamic.DynamicStereotypeInputData;
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 DynamicStereotypeTest extends AbstractTest {
+public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
private DynamicStereotypeInputData input = new DynamicStereotypeInputData();
- @After
- public void cleanup() {
- for (ResourceSet set : input.getSets()) {
- for (Resource res : set.getResources()) {
- res.unload();
- }
- set.getResources().clear();
- }
- }
-
@Test
public void testA10UseCase() throws IOException {
final Resource left = input.getA1Left();
@@ -1063,7 +1051,7 @@ public class DynamicStereotypeTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
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
index 5b00a4e75..a1283fa4e 100644
--- 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
@@ -24,33 +24,21 @@ import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.ResourceAttachmentChange;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractStaticProfileTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.stereotypes.data.static_.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 {
+public class StaticStereotypeTest extends AbstractStaticProfileTest {
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();
@@ -1219,7 +1207,7 @@ public class StaticStereotypeTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
index 33c7eee22..6c616f5c1 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.stereotypes.data.dynamic;
import java.io.IOException;
-import org.eclipse.emf.compare.uml2.tests.ProfilesInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class DynamicStereotypeInputData extends ProfilesInputData {
+public class DynamicStereotypeInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/static_/StaticStereotypeInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/static_/StaticStereotypeInputData.java
index 39d307e48..362949bee 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/static_/StaticStereotypeInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/static_/StaticStereotypeInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.stereotypes.data.static_;
import java.io.IOException;
-import org.eclipse.emf.compare.uml2.tests.ProfilesInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class StaticStereotypeInputData extends ProfilesInputData {
+public class StaticStereotypeInputData extends AbstractUMLInputData {
public Resource getB1Left() throws IOException {
return loadFromClassLoader("b1/left.uml"); //$NON-NLS-1$
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 35b5666b2..a988dc762 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
@@ -14,7 +14,6 @@ import junit.framework.JUnit4TestAdapter;
import junit.framework.Test;
import junit.textui.TestRunner;
-import org.eclipse.emf.compare.tests.suite.CompareTestSuite;
import org.eclipse.emf.compare.uml2.tests.association.AddAssociation2Test;
import org.eclipse.emf.compare.uml2.tests.association.AddAssociation3Test;
import org.eclipse.emf.compare.uml2.tests.association.AddAssociationTest;
@@ -37,7 +36,8 @@ import org.eclipse.emf.compare.uml2.tests.implications.ImplicationsTransitionTes
import org.eclipse.emf.compare.uml2.tests.include.AddIncludeTest;
import org.eclipse.emf.compare.uml2.tests.merge.ExtensionMergeTest;
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.profiles.DynamicProfileTest;
+import org.eclipse.emf.compare.uml2.tests.profiles.StaticProfileTest;
import org.eclipse.emf.compare.uml2.tests.stereotypes.DynamicStereotypeTest;
import org.eclipse.emf.compare.uml2.tests.stereotypes.StaticStereotypeTest;
import org.eclipse.emf.compare.uml2.tests.timeConstraint.AddTimeConstraintTest;
@@ -57,9 +57,9 @@ 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, DynamicStereotypeTest.class,
- StaticStereotypeTest.class, ImplicationsAssociationTest.class, ImplicationsTransitionTest.class,
- ImplicationsInterfaceRealizationTest.class })
+ AddIncludeTest.class, AddTimeConstraintTest.class, StaticProfileTest.class, DynamicProfileTest.class,
+ StaticStereotypeTest.class, DynamicStereotypeTest.class, ImplicationsAssociationTest.class,
+ ImplicationsTransitionTest.class, ImplicationsInterfaceRealizationTest.class })
public class AllTests {
/**
@@ -77,7 +77,7 @@ public class AllTests {
* @generated
*/
public static Test suite() {
- return new JUnit4TestAdapter(CompareTestSuite.class);
+ return new JUnit4TestAdapter(AllTests.class);
}
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
index e1ad4563b..71fb767ca 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
@@ -21,15 +21,15 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.compare.uml2.internal.IntervalConstraintChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.timeConstraint.data.TimeConstraintInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@SuppressWarnings("nls")
-public class AddTimeConstraintTest extends AbstractTest {
+public class AddTimeConstraintTest extends AbstractUMLTest {
private TimeConstraintInputData input = new TimeConstraintInputData();
@@ -240,7 +240,7 @@ public class AddTimeConstraintTest extends AbstractTest {
}
@Override
- protected AbstractInputData getInput() {
+ protected AbstractUMLInputData getInput() {
return input;
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/data/TimeConstraintInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/data/TimeConstraintInputData.java
index 85cd7f081..e99c55dd8 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/data/TimeConstraintInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/data/TimeConstraintInputData.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.uml2.tests.timeConstraint.data;
import java.io.IOException;
-import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.ecore.resource.Resource;
-public class TimeConstraintInputData extends AbstractInputData {
+public class TimeConstraintInputData extends AbstractUMLInputData {
public Resource getA1Left() throws IOException {
return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
}

Back to the top