Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'proprietary/tests/org.eclipse.upr.platform.java.profiles.test')
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.classpath7
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.gitignore1
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.project28
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/META-INF/MANIFEST.MF15
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/about.html22
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/build.properties17
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/plugin.properties17
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/pom.xml27
-rw-r--r--proprietary/tests/org.eclipse.upr.platform.java.profiles.test/src/org/eclipse/upr/platform/java/profiles/test/TestProfiles.java80
10 files changed, 221 insertions, 0 deletions
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.classpath b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.classpath
new file mode 100644
index 0000000..098194c
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.classpath
@@ -0,0 +1,7 @@
+<?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.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.gitignore b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.project b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.project
new file mode 100644
index 0000000..61a71b2
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.upr.platform.java.profiles.test</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/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.settings/org.eclipse.jdt.core.prefs b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f42de36
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/.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.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/META-INF/MANIFEST.MF b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fc6f014
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.upr.platform.java.profiles.test
+Bundle-Version: 0.9.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7,
+ JavaSE-1.8
+Require-Bundle: org.junit,
+ org.eclipse.emf.ecore,
+ org.eclipse.uml2.uml;bundle-version="5.0.2",
+ org.eclipse.uml2.uml.resources;bundle-version="5.0.2"
+Bundle-ActivationPolicy: lazy
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/about.html b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/about.html
new file mode 100644
index 0000000..6f6b96c
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>February 24, 2005</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 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/build.properties b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/build.properties
new file mode 100644
index 0000000..4939696
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2015 TU Wien.
+# 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:
+# Alexander Bergmayr (TU Wien) - initial API and implementation
+#
+# Initially developed in the context of ARTIST EU project www.artist-project.eu
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/plugin.properties b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/plugin.properties
new file mode 100644
index 0000000..20c5ffc
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/plugin.properties
@@ -0,0 +1,17 @@
+# <copyright>
+# Copyright (c) 2015 TU Wien.
+# 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:
+# Alexander Bergmayr (TU Wien) - initial API and implementation
+#
+# Initially developed in the context of ARTIST EU project www.artist-project.eu
+# </copyright>
+#
+# $Id$
+
+pluginName = UML profiles based on Java libraries test (Incubation)
+providerName = Eclipse UPR
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/pom.xml b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/pom.xml
new file mode 100644
index 0000000..824e960
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 TU Wien.
+ 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:
+ Alexander Bergmayr (TU Wien) - initial API and implementation
+
+ Initially developed in the context of ARTIST EU project www.artist-project.eu
+-->
+<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.upr.jump</groupId>
+ <artifactId>org.eclipse.upr.platform.jump.build</artifactId>
+ <relativePath>../../build/org.eclipse.upr.platform.jump.build/pom.xml</relativePath>
+ <version>0.9.0</version>
+ </parent>
+ <groupId>org.eclipse.upr.jump</groupId>
+ <artifactId>org.eclipse.upr.platform.java.profiles.test</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/src/org/eclipse/upr/platform/java/profiles/test/TestProfiles.java b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/src/org/eclipse/upr/platform/java/profiles/test/TestProfiles.java
new file mode 100644
index 0000000..b5052e7
--- /dev/null
+++ b/proprietary/tests/org.eclipse.upr.platform.java.profiles.test/src/org/eclipse/upr/platform/java/profiles/test/TestProfiles.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Vienna University of Technology.
+ * 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:
+ * Alexander Bergmayr (Vienna University of Technology) - initial API and implementation
+ *
+ * Initially developed in the context of ARTIST EU project www.artist-project.eu
+ *******************************************************************************/
+
+package org.eclipse.upr.platform.java.profiles.test;
+
+import static org.eclipse.uml2.uml.UMLPlugin.getEPackageNsURIToProfileLocationMap;
+import static org.eclipse.uml2.uml.resources.util.UMLResourcesUtil.init;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.uml2.uml.Profile;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestProfiles {
+
+ Collection<String> uprProfiles;
+
+ @Before
+ public void setUp() throws Exception {
+ uprProfiles = new ArrayList<String>(
+ Arrays.asList(
+ "http:///schemas/EclipseLink/_bwp8sBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/ejb30/_cWvFQBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/ejb32/_c7NrUBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/findBugs/__KplkBt0EeWb19NaJQmczQ/0",
+ "http:///schemas/hibernatecore/_lQUHUBtwEeWZE8BV_IWn7Q/0",
+ "http:///schemas/jacksonannotations/_tkL-ALAwEeSts9jnR_oQsA/0",
+ "http:///schemas/javaxannotation/_xb5hIBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/javaxcdi/_AVckwBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/javaxinject/_AgglQBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/javaxinterceptor/_ArMLQBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/javaxvalidation/_8SEO4Bt0EeWb19NaJQmczQ/0",
+ "http:///schemas/javaxws/_w3yHcBt1EeWb19NaJQmczQ/0",
+ "http:///schemas/jaxb/_4tU80Bt0EeWb19NaJQmczQ/0",
+ "http:///schemas/jaxrs/_oZrcQOg8EeSj2uQUDGM5Yw/1",
+ "http:///schemas/jbossarquillian/_8c_FcBt0EeWb19NaJQmczQ/0",
+ "http:///schemas/jdk7/_3-fg4Bt0EeWb19NaJQmczQ/0",
+ "http:///schemas/jpa2/_4co1cBt0EeWb19NaJQmczQ/0",
+ "http:///schemas/junit/_1Ka2wBt0EeWb19NaJQmczQ/0",
+ "http:///schemas/objectify/_5G_aABt0EeWb19NaJQmczQ/0",
+ "http:///schemas/springbundle/_8AogoBt0EeWb19NaJQmczQ/0",
+ "http:///schemas/strutsbundlenolibrary/_AGTVgBt1EeWb19NaJQmczQ/0"));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void test() {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ init(resourceSet);
+
+ for (String uri : uprProfiles) {
+ EObject eObj = resourceSet.getEObject(
+ getEPackageNsURIToProfileLocationMap().get(uri), true);
+ assertThat(eObj, instanceOf(Profile.class));
+ }
+ }
+
+}

Back to the top