Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Pascual2015-03-11 18:00:19 +0000
committerGabriel Pascual2015-03-11 18:18:24 +0000
commit9ef030d80a795a0bd2dbcb34d31a8a960105f925 (patch)
tree9f3443b0ad479d579a59c1a09a931d279daab137 /tests/junit
parent54385e986e904d570887483c1551a157cf080ec6 (diff)
downloadorg.eclipse.papyrus-9ef030d80a795a0bd2dbcb34d31a8a960105f925.tar.gz
org.eclipse.papyrus-9ef030d80a795a0bd2dbcb34d31a8a960105f925.tar.xz
org.eclipse.papyrus-9ef030d80a795a0bd2dbcb34d31a8a960105f925.zip
Bug 459427: [Control Mode] Unit tests shall be improved to avoid
regression https://bugs.eclipse.org/bugs/show_bug.cgi?id=459427 - Fix Manifest of data project - Change error message to improve its comprehension Change-Id: I2bc4b83235d57be5288612f1218d91475ac87a2b Signed-off-by: Gabriel Pascual <gabriel.pascual@all4tec.net>
Diffstat (limited to 'tests/junit')
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.di2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.notation31
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.uml7
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeSameResource/model.manifest2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileSameResource/model.manifest2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileTest/submodel.uml25
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java2
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java6
8 files changed, 18 insertions, 59 deletions
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.di
deleted file mode 100644
index 8634d4c00e0..00000000000
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.di
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.notation
deleted file mode 100644
index adb7e73b5b6..00000000000
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.notation
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_TQU0cLaBEeOpyp3GKGu8Hw" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_UVYYALaBEeOpyp3GKGu8Hw" type="2008">
- <children xmi:type="notation:DecorationNode" xmi:id="_UVfFsLaBEeOpyp3GKGu8Hw" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_UVlzYLaBEeOpyp3GKGu8Hw" type="7017">
- <styles xmi:type="notation:TitleStyle" xmi:id="_UVlzYbaBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UVlzYraBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UVlzY7aBEeOpyp3GKGu8Hw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVlzZLaBEeOpyp3GKGu8Hw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_UVlzZbaBEeOpyp3GKGu8Hw" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_UVlzZraBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UVlzZ7aBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UVlzaLaBEeOpyp3GKGu8Hw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVlzabaBEeOpyp3GKGu8Hw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_UVlzaraBEeOpyp3GKGu8Hw" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_UVlza7aBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UVlzbLaBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UVlzbbaBEeOpyp3GKGu8Hw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVlzbraBEeOpyp3GKGu8Hw"/>
- </children>
- <element xmi:type="uml:Class" href="ControlModeTestModel.uml#_iORqgLUNEeOpyp3GKGu8Hw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVYYAbaBEeOpyp3GKGu8Hw" x="420" y="179"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_TQU0cbaBEeOpyp3GKGu8Hw"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_TQU0craBEeOpyp3GKGu8Hw">
- <owner xmi:type="uml:Model" href="ControlModeTestModel.uml#_LOdvgLNPEeOZR-JQ361_AA"/>
- </styles>
- <element xmi:type="uml:Model" href="ControlModeTestModel.uml#_LOdvgLNPEeOZR-JQ361_AA"/>
-</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.uml
deleted file mode 100644
index f37825cb692..00000000000
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/ControlModelTest/ControlModeTestModel.uml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_LOdvgLNPEeOZR-JQ361_AA" name="model">
- <packagedElement xmi:type="uml:Package" xmi:id="_OE-poLNPEeOZR-JQ361_AA" name="Package">
- <packagedElement xmi:type="uml:Class" xmi:id="_hZTxYLUNEeOpyp3GKGu8Hw" name="Class"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_iORqgLUNEeOpyp3GKGu8Hw" name="Class"/>
-</uml:Model>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeSameResource/model.manifest b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeSameResource/model.manifest
index 81b20ef31c3..8f9dc58d823 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeSameResource/model.manifest
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeSameResource/model.manifest
@@ -2,5 +2,5 @@ model.di
model.notation
model.uml
SubModels.di
-Submodels.notation
+SubModels.notation
SubModels.uml \ No newline at end of file
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileSameResource/model.manifest b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileSameResource/model.manifest
index 81b20ef31c3..8f9dc58d823 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileSameResource/model.manifest
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileSameResource/model.manifest
@@ -2,5 +2,5 @@ model.di
model.notation
model.uml
SubModels.di
-Submodels.notation
+SubModels.notation
SubModels.uml \ No newline at end of file
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileTest/submodel.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileTest/submodel.uml
index dee5169c60c..7ca7f75bb5d 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileTest/submodel.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/model/UncontrolModeWithProfileTest/submodel.uml
@@ -1,14 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile="http:///schemas/profile/_Rtcl8LpyEeOiIqA0Y8pjRA/0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile/_Rtcl8LpyEeOiIqA0Y8pjRA/0 testProfile.profile.uml#_RtfCMLpyEeOiIqA0Y8pjRA">
- <uml:Package xmi:id="_BRaDULsMEeO75-I_oucZEA" name="submodel">
- <packagedElement xmi:type="uml:Class" xmi:id="_zQQOQLpyEeOiIqA0Y8pjRA" name="Class1"/>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_wnZkULswEeOBNLJQ9YB1Vw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wnZkUbswEeOBNLJQ9YB1Vw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="testProfile.profile.uml#_RtfCMLpyEeOiIqA0Y8pjRA"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wnhgILswEeOBNLJQ9YB1Vw" source="duplicatedProfile"/>
- <appliedProfile xmi:type="uml:Profile" href="testProfile.profile.uml#_JOBikLpyEeOiIqA0Y8pjRA"/>
- </profileApplication>
- </uml:Package>
- <profile:Stereotype1 xmi:id="_wD21YLsPEeOBNLJQ9YB1Vw" base_Class="_zQQOQLpyEeOiIqA0Y8pjRA"/>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_BRaDULsMEeO75-I_oucZEA" name="submodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_zQQOQLpyEeOiIqA0Y8pjRA" name="Class1"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_wnZkULswEeOBNLJQ9YB1Vw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wnZkUbswEeOBNLJQ9YB1Vw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="testProfile.profile.uml#_RtfCMLpyEeOiIqA0Y8pjRA"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wnhgILswEeOBNLJQ9YB1Vw" source="duplicatedProfile"/>
+ <appliedProfile xmi:type="uml:Profile" href="testProfile.profile.uml#_JOBikLpyEeOiIqA0Y8pjRA"/>
+ </profileApplication>
+</uml:Package>
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
index ff59c6862bc..526434faedf 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
@@ -439,7 +439,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
result.load(null);
} catch (Exception e) {
e.printStackTrace();
- fail("Failed to load test resource: " + e.getLocalizedMessage());
+ fail("Failed to load test resource: " + resourceIPath.toString());
}
}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java
index ad7f49baa20..e3fa47772b5 100644
--- a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.io.IOException;
@@ -100,7 +101,7 @@ public class AdditionalModelStructuresTest extends AbstractDecoratorModelControl
@Override
public void run() {
getPackage2_1().createNestedPackage("package2_1_1");
- getPackage2_1().createNestedPackage("package2_1_2").createNestedPackage("2_1_2_1");
+ getPackage2_1().createNestedPackage("package2_1_2").createNestedPackage("package2_1_2_1");
}
});
@@ -110,7 +111,8 @@ public class AdditionalModelStructuresTest extends AbstractDecoratorModelControl
Package package2_1_1 = getPackage2_1().getNestedPackage("package2_1_1");
Package package2_1_2 = getPackage2_1().getNestedPackage("package2_1_2");
- Package package2_1_2_1 = getPackage2_1().getNestedPackage("package2_1_2_1");
+ assertNotNull(package2_1_2);
+ Package package2_1_2_1 = package2_1_2.getNestedPackage("package2_1_2_1");
assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));

Back to the top