Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-12-06 08:13:22 +0000
committerGerrit Code Review @ Eclipse.org2016-12-06 10:20:03 +0000
commit94c735f83ee5a5bc965ddf7a117c164bd2834554 (patch)
tree6011644551757e7fb20886d59c283cbcac490d40 /tests
parentf9e95dc5587928aff70558d98cd35a298e2fc782 (diff)
downloadorg.eclipse.papyrus-94c735f83ee5a5bc965ddf7a117c164bd2834554.tar.gz
org.eclipse.papyrus-94c735f83ee5a5bc965ddf7a117c164bd2834554.tar.xz
org.eclipse.papyrus-94c735f83ee5a5bc965ddf7a117c164bd2834554.zip
Bug 508712 - [Internationalization][Tests] JUnit tests don't pass on
hudson https://bugs.eclipse.org/bugs/show_bug.cgi?id=508712 - Change the label provider to get (use the label provider in the model explorer. Change-Id: I5d8467b3883b24c59a9a539d0a928590331b2fdb Signed-off-by: Nicolas FAUVERGUE <nicolasfauvergue@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/src/org/eclipse/papyrus/uml/internationalization/controlmode/tests/tests/AbstractInternationalizationControlModeTest.java12
-rw-r--r--tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/src/org/eclipse/papyrus/uml/internationalization/tests/tests/AbstractUMLInternationalizationTest.java22
4 files changed, 20 insertions, 20 deletions
diff --git a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/META-INF/MANIFEST.MF
index 16f8091e0da..d77a94c9b7a 100644
--- a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/META-INF/MANIFEST.MF
@@ -20,6 +20,7 @@ Require-Bundle: org.junit;bundle-version="[4.11.0,5.0.0)",
org.eclipse.papyrus.infra.services.controlmode;bundle-version="[1.5.0,2.0.0)",
org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.infra.internationalization.common;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.internationalization.common;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.papyrus.uml.internationalization.controlmode.tests.Activator
diff --git a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/src/org/eclipse/papyrus/uml/internationalization/controlmode/tests/tests/AbstractInternationalizationControlModeTest.java b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/src/org/eclipse/papyrus/uml/internationalization/controlmode/tests/tests/AbstractInternationalizationControlModeTest.java
index d974cd5e2af..2084e39b43f 100644
--- a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/src/org/eclipse/papyrus/uml/internationalization/controlmode/tests/tests/AbstractInternationalizationControlModeTest.java
+++ b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.controlmode.tests/src/org/eclipse/papyrus/uml/internationalization/controlmode/tests/tests/AbstractInternationalizationControlModeTest.java
@@ -89,10 +89,10 @@ public abstract class AbstractInternationalizationControlModeTest extends Abstra
public void checkNoLabels() throws Exception {
super.checkNoLabels();
- Assert.assertEquals("The root element label is not the expected one.", "ClassDiagram",
+ Assert.assertEquals("The root element label is not the expected one.", "Diagram ClassDiagram",
labelProvider.getText(diagram));
- Assert.assertEquals("The class label is not the expected one.", "GenericTable0", labelProvider.getText(table));
+ Assert.assertEquals("The class label is not the expected one.", "Table GenericTable0", labelProvider.getText(table));
}
/**
@@ -104,10 +104,10 @@ public abstract class AbstractInternationalizationControlModeTest extends Abstra
public void checkFrenchLabels() throws Exception {
super.checkFrenchLabels();
- Assert.assertEquals("The root element label is not the expected one.", "MonDiagrammeDeClasse",
+ Assert.assertEquals("The root element label is not the expected one.", "Diagram MonDiagrammeDeClasse",
labelProvider.getText(diagram));
- Assert.assertEquals("The class label is not the expected one.", "MaTableGenerique",
+ Assert.assertEquals("The class label is not the expected one.", "Table MaTableGenerique",
labelProvider.getText(table));
}
@@ -120,10 +120,10 @@ public abstract class AbstractInternationalizationControlModeTest extends Abstra
public void checkEnglishLabels() throws Exception {
super.checkEnglishLabels();
- Assert.assertEquals("The root element label is not the expected one.", "MyClassDiagram",
+ Assert.assertEquals("The root element label is not the expected one.", "Diagram MyClassDiagram",
labelProvider.getText(diagram));
- Assert.assertEquals("The class label is not the expected one.", "MyGenericTable", labelProvider.getText(table));
+ Assert.assertEquals("The class label is not the expected one.", "Table MyGenericTable", labelProvider.getText(table));
}
/**
diff --git a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/META-INF/MANIFEST.MF
index 750945f9585..6648f782830 100644
--- a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/META-INF/MANIFEST.MF
@@ -19,6 +19,7 @@ Require-Bundle: org.junit;bundle-version="[4.11.0,5.0.0)",
org.eclipse.ui.workbench;bundle-version="[3.109.0,4.0.0)",
org.eclipse.papyrus.infra.emf.tests;bundle-version="[1.4.0,2.0.0)",
org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)",
- org.eclipse.papyrus.infra.internationalization.common;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.internationalization.common;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.papyrus.uml.internationalization.tests.Activator
diff --git a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/src/org/eclipse/papyrus/uml/internationalization/tests/tests/AbstractUMLInternationalizationTest.java b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/src/org/eclipse/papyrus/uml/internationalization/tests/tests/AbstractUMLInternationalizationTest.java
index f61fbe326f0..14a02453a9e 100644
--- a/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/src/org/eclipse/papyrus/uml/internationalization/tests/tests/AbstractUMLInternationalizationTest.java
+++ b/tests/junit/plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.tests/src/org/eclipse/papyrus/uml/internationalization/tests/tests/AbstractUMLInternationalizationTest.java
@@ -13,13 +13,9 @@
package org.eclipse.papyrus.uml.internationalization.tests.tests;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.uml.internationalization.tests.Activator;
+import org.eclipse.papyrus.views.modelexplorer.DecoratingLabelProviderWTooltips;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Interface;
@@ -83,7 +79,7 @@ public abstract class AbstractUMLInternationalizationTest extends AbstractEditor
protected Enumeration modelEnumeration;
/** The label provider. */
- protected ILabelProvider labelProvider;
+ protected DecoratingLabelProviderWTooltips labelProvider;
/**
* Constructor.
@@ -105,12 +101,14 @@ public abstract class AbstractUMLInternationalizationTest extends AbstractEditor
model = getRootUMLModel();
Assert.assertNotNull("The model cannot be null", model);
- try {
- labelProvider = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, (EObject) model)
- .getLabelProvider();
- } catch (final ServiceException ex) {
- Activator.log.error(ex);
- }
+ labelProvider = (DecoratingLabelProviderWTooltips) getModelExplorerView().getCommonViewer().getLabelProvider();
+
+// try {
+// labelProvider = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, (EObject) model)
+// .getLabelProvider();
+// } catch (final ServiceException ex) {
+// Activator.log.error(ex);
+// }
modelClass = (Class) model.getOwnedMember(CLASS_NAME);
Assert.assertNotNull("The class cannot be null", modelClass);

Back to the top