Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compatibility')
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.classpath11
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.project28
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/META-INF/MANIFEST.MF12
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/OSGI-INF/l10n/bundle.properties3
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/README5
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/about.html28
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/build.properties18
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/pom.xml16
-rwxr-xr-xtests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/src/org/eclipse/papyrus/compatibility/cdo/tests/CDOInstallationTest.java58
-rwxr-xr-xtests/compatibility/cdo/pom.xml23
11 files changed, 209 insertions, 0 deletions
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.classpath b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.classpath
new file mode 100755
index 00000000000..3e5654f17eb
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.project b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.project
new file mode 100755
index 00000000000..07d9580f439
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.compatibility.cdo.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.settings/org.eclipse.jdt.core.prefs b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..0c68a61dca8
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/META-INF/MANIFEST.MF b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..be8d2c57b53
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.compatibility.cdo.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Automatic-Module-Name: org.eclipse.papyrus.compatibility.cdo.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.junit;bundle-version="[4.12.0,5.0.0)",
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.4.0,6.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[2.0.0,3.0.0)"
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/OSGI-INF/l10n/bundle.properties b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 00000000000..f5bbfe4314b
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.compatibility.cdo.tests
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Compatibility CDO Tests \ No newline at end of file
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/README b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/README
new file mode 100755
index 00000000000..61ee03229e9
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/README
@@ -0,0 +1,5 @@
+This plugin is here, to check that the CDO version of metamodels used in Papyrus are in the tested installation.
+So we run, in a dedicated job, the Papyrus JUnit tests, using the metamodels provided by CDO. (UML, Notation, and others).
+So this plugin doesn't execute CDO JUnit tests, it just check the CDO installation.
+So the tests result must be the same than without CDO installed of course.
+
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/about.html b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/about.html
new file mode 100755
index 00000000000..997c5a2284d
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/build.properties b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/build.properties
new file mode 100755
index 00000000000..e218575bc18
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/build.properties
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2016 Christian W. Damus and others
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Vincent LORENZO (CEA-LIST) - Initial API and implementation
+#
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/pom.xml b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/pom.xml
new file mode 100755
index 00000000000..e4bf4a86234
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.compatibility.tests-cdo</groupId>
+ <artifactId>org.eclipse.papyrus.plugins.tests.cdo</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.compatibility.cdo.tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/src/org/eclipse/papyrus/compatibility/cdo/tests/CDOInstallationTest.java b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/src/org/eclipse/papyrus/compatibility/cdo/tests/CDOInstallationTest.java
new file mode 100755
index 00000000000..1c753791983
--- /dev/null
+++ b/tests/compatibility/cdo/org.eclipse.papyrus.compatibility.cdo.tests/src/org/eclipse/papyrus/compatibility/cdo/tests/CDOInstallationTest.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.compatibility.cdo.tests;
+
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.style.StyleFactory;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ * This test classes allows to check that the CDO version of metamodel is used by the Eclipse Instance
+ */
+@SuppressWarnings("nls")
+public class CDOInstallationTest {
+
+ private static final String PAPYRUS_NOTATION_CDO_FACTORY_CLASS_NAME = "org.eclipse.papyrus.infra.gmfdiag.css.cdo.factory.CSSNotationFactory";
+
+ private static final String PAPYRUS_DIAGRAM_STYLE_CDO_FACTORY_CLASS_NAME = "org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.StyleFactoryImpl";
+
+ private static final String PAPYRUS_UML_CDO_FACTORY_CLASS_NAME = "org.eclipse.uml2.uml.cdo.internal.impl.UMLFactoryImpl";
+
+ @Test
+ public void checkNotationFactory() {
+ final NotationFactory notationFactory = NotationFactory.eINSTANCE;
+ final String name = notationFactory.getClass().getName();
+ Assert.assertEquals("The tests result is wrong, because the CDO version of GMF Notation is not installed (or used?!).", PAPYRUS_NOTATION_CDO_FACTORY_CLASS_NAME, name);
+ }
+
+ @Test
+ public void checkStyleFactory() {
+ final StyleFactory notationFactory = StyleFactory.eINSTANCE;
+ final String name = notationFactory.getClass().getName();
+ Assert.assertEquals("The tests result is wrong, because the CDO version of the Diagram Style is not installed (or used?!).", PAPYRUS_DIAGRAM_STYLE_CDO_FACTORY_CLASS_NAME, name);
+ }
+
+ @Test
+ public void checkUMLFactory() {
+ final UMLFactory umlFactory = UMLFactory.eINSTANCE;
+ final String name = umlFactory.getClass().getName();
+ Assert.assertEquals("The tests result is wrong, because the CDO version of the UML Metamodel is not installed (or used?!).", PAPYRUS_UML_CDO_FACTORY_CLASS_NAME, name);
+ }
+}
diff --git a/tests/compatibility/cdo/pom.xml b/tests/compatibility/cdo/pom.xml
new file mode 100755
index 00000000000..fc73b37210f
--- /dev/null
+++ b/tests/compatibility/cdo/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.tests.cdo.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../../../releng/main-tests-with-cdo/pom.xml</relativePath>
+ </parent>
+ <groupId>org.eclipse.papyrus.compatibility.tests-cdo</groupId>
+ <artifactId>org.eclipse.papyrus.plugins.tests.cdo</artifactId>
+ <packaging>pom</packaging>
+ <description>The top container of plug-in projects compatibility tests for the main Papyrus distribution.</description>
+
+ <modules>
+ <!-- children -->
+ <module>org.eclipse.papyrus.compatibility.cdo.tests</module>
+ </modules>
+
+</project> \ No newline at end of file

Back to the top