Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2017-04-18 13:23:50 +0000
committerLaurent Redor2017-04-19 08:46:57 +0000
commit7c863d6cd1eb338d7f284d78be53f2590831f219 (patch)
tree1ca6c257a9fdd6382000b8625439d92294a7cd04
parente567b735cab26e26ed5289ccac936dcb53bfc3cb (diff)
downloadorg.eclipse.sirius-7c863d6cd1eb338d7f284d78be53f2590831f219.tar.gz
org.eclipse.sirius-7c863d6cd1eb338d7f284d78be53f2590831f219.tar.xz
org.eclipse.sirius-7c863d6cd1eb338d7f284d78be53f2590831f219.zip
[515044] Fix use case data of automatic tests
The use case data for automatic tests was corrupted. The test was OK, but the use case data can not be reused for manual tests. This commit also used the copied data instead of the original one (from oes.tests.junit plugin). Bug: 515044 Change-Id: I25f969e329bfa9f9df573dcaf9fa0306cfa2534b Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/data/unit/migration/do_not_migrate/noteAttachmentAlignment/noteAttachmentAlignment.aird10
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/NoteShapeDefaultLabelAlignmentMigrationTest.java8
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/data/unit/migration/do_not_migrate/noteAttachmentAlignment/noteAttachmentAlignment.aird b/plugins/org.eclipse.sirius.tests.junit/data/unit/migration/do_not_migrate/noteAttachmentAlignment/noteAttachmentAlignment.aird
index 23dfe45bff..856c478a15 100644
--- a/plugins/org.eclipse.sirius.tests.junit/data/unit/migration/do_not_migrate/noteAttachmentAlignment/noteAttachmentAlignment.aird
+++ b/plugins/org.eclipse.sirius.tests.junit/data/unit/migration/do_not_migrate/noteAttachmentAlignment/noteAttachmentAlignment.aird
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
<viewpoint:DAnalysis xmi:id="_k7WwEebREeaOa_5yitWewA" selectedViews="_jkvtAObSEeaOa_5yitWewA" version="11.1.0.201608251200">
- <semanticResources>My.ecore</semanticResources>
+ <semanticResources>noteAttachmentAlignment.ecore</semanticResources>
<ownedViews xmi:type="viewpoint:DView" xmi:id="_jkvtAObSEeaOa_5yitWewA">
<viewpoint xmi:type="description:Viewpoint" href="noteAttachmentAlignment.odesign#//@ownedViewpoints[name='MyViewpoint']"/>
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_1md08BVUEeeX-9J1yKditQ" name="new ClassDiag" representation="_1mecABVUEeeX-9J1yKditQ">
- <description xmi:type="description_1:DiagramDescription" href="My.odesign#//@ownedViewpoints[name='MyViewpoint']/@ownedRepresentations[name='ClassDiag']"/>
- <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <description xmi:type="description_1:DiagramDescription" href="noteAttachmentAlignment.odesign#//@ownedViewpoints[name='MyViewpoint']/@ownedRepresentations[name='ClassDiag']"/>
+ <target xmi:type="ecore:EPackage" href="noteAttachmentAlignment.ecore#/"/>
</ownedRepresentationDescriptors>
</ownedViews>
</viewpoint:DAnalysis>
@@ -33,7 +33,7 @@
</ownedAnnotationEntries>
<description xmi:type="description_1:DiagramDescription" href="noteAttachmentAlignment.odesign#//@ownedViewpoints[name='MyViewpoint']/@ownedRepresentations[name='ClassDiag']"/>
<filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_1mecAxVUEeeX-9J1yKditQ"/>
- <activatedLayers xmi:type="description_1:Layer" href="My.odesign#//@ownedViewpoints[name='MyViewpoint']/@ownedRepresentations[name='ClassDiag']/@defaultLayer"/>
- <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <activatedLayers xmi:type="description_1:Layer" href="noteAttachmentAlignment.odesign#//@ownedViewpoints[name='MyViewpoint']/@ownedRepresentations[name='ClassDiag']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="noteAttachmentAlignment.ecore#/"/>
</diagram:DSemanticDiagram>
</xmi:XMI>
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/NoteShapeDefaultLabelAlignmentMigrationTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/NoteShapeDefaultLabelAlignmentMigrationTest.java
index 625ea0ac02..541fa4cff9 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/NoteShapeDefaultLabelAlignmentMigrationTest.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/NoteShapeDefaultLabelAlignmentMigrationTest.java
@@ -50,6 +50,8 @@ public class NoteShapeDefaultLabelAlignmentMigrationTest extends SiriusTestCase
private static final String SEMANTIC_RESOURCE_NAME = "noteAttachmentAlignment.ecore";
+ private static final String VSM_RESOURCE_NAME = "noteAttachmentAlignment.odesign";
+
private Resource sessionResource;
@Override
@@ -61,8 +63,8 @@ public class NoteShapeDefaultLabelAlignmentMigrationTest extends SiriusTestCase
protected void setUp() throws Exception {
super.setUp();
genericSetUp();
- copyFilesToTestProject(SiriusTestsPlugin.PLUGIN_ID, PATH, SESSION_RESOURCE_NAME, SEMANTIC_RESOURCE_NAME);
- URI sessionResourceURI = URI.createPlatformPluginURI(SiriusTestsPlugin.PLUGIN_ID + "/" + PATH + SESSION_RESOURCE_NAME, true);
+ copyFilesToTestProject(SiriusTestsPlugin.PLUGIN_ID, PATH, SESSION_RESOURCE_NAME, SEMANTIC_RESOURCE_NAME, VSM_RESOURCE_NAME);
+ URI sessionResourceURI = URI.createPlatformResourceURI(SiriusTestCase.TEMPORARY_PROJECT_NAME + "/" + SESSION_RESOURCE_NAME, true);
ResourceSet resourceSet = new ResourceSetImpl();
sessionResource = resourceSet.getResource(sessionResourceURI, true);
@@ -76,7 +78,7 @@ public class NoteShapeDefaultLabelAlignmentMigrationTest extends SiriusTestCase
Version migrationVersion = new NoteShapeDefaultLabelAlignmentMigrationParticipant().getMigrationVersion();
// Check that the migration of the session resource is needed.
- Version loadedVersion = checkRepresentationFileMigrationStatus(URI.createPlatformPluginURI(SiriusTestsPlugin.PLUGIN_ID + "/" + PATH + SESSION_RESOURCE_NAME, true), true);
+ Version loadedVersion = checkRepresentationFileMigrationStatus(URI.createPlatformResourceURI(SiriusTestCase.TEMPORARY_PROJECT_NAME + "/" + SESSION_RESOURCE_NAME, true), true);
assertTrue("The migration must be required on test data.", loadedVersion == null || migrationVersion.compareTo(loadedVersion) > 0);
}

Back to the top