Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-05-26 15:21:46 +0000
committerptessier2014-05-26 15:21:46 +0000
commit773d64eab333c06cae5e363d8f140f8efe9347a5 (patch)
tree9e0fe5e30e83d91c4a6891bcdfb130f38d6763ea /tests/junit
parent756ff1883fadfd58c78406e9c1853c62692bd1b1 (diff)
downloadorg.eclipse.papyrus-773d64eab333c06cae5e363d8f140f8efe9347a5.tar.gz
org.eclipse.papyrus-773d64eab333c06cae5e363d8f140f8efe9347a5.tar.xz
org.eclipse.papyrus-773d64eab333c06cae5e363d8f140f8efe9347a5.zip
412165: [Refactoring Tests] The tests plug-in should be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=412165 Change-Id: Id5ee218831f296415080c6b10eaae7890eb67e56
Diffstat (limited to 'tests/junit')
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF26
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch45
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/Activator.java50
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java32
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/ICommunicationDiagramTestsConstants.java22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/AllCanonicalTests.java31
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramChildNode.java105
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramLink.java59
14 files changed, 460 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.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.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project
new file mode 100644
index 00000000000..9a188a59eb0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.communication.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/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f287d53cf45
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.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.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..a45db0cb70a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.communication.tests;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.communication.tests.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.communication;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.diagram.tests;bundle-version="1.0.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
+ org.eclipse.gmf.tooling.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-Vendor: %providerName
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.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>June 5, 2007</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
+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/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties
new file mode 100644
index 00000000000..0c7771957fe
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html,\
+ plugin.properties
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch
new file mode 100644
index 00000000000..9c9b84fa32c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/src"/>
+<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/custom-src"/>
+</listAttribute>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.communication.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.communication.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="false"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/plugin.properties
new file mode 100644
index 00000000000..2df832408a5
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2012 CEA LIST.
+# 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:
+# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus communication Diagram Test (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/Activator.java
new file mode 100644
index 00000000000..3e46f293313
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.uml.diagram.communication.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.communication.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java
new file mode 100644
index 00000000000..c124babff25
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.tests;
+
+import org.eclipse.papyrus.uml.diagram.communication.tests.canonical.AllCanonicalTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+ // canonical
+AllCanonicalTests.class,
+
+})
+public class AllTests {
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/ICommunicationDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/ICommunicationDiagramTestsConstants.java
new file mode 100644
index 00000000000..ba0c1a11661
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/ICommunicationDiagramTestsConstants.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * 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:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.tests;
+
+public interface ICommunicationDiagramTestsConstants {
+
+ /** name of the test project */
+ public final String PROJECT_NAME = "CommunicationDiagramTestProject";
+
+ /** name of the test model */
+ public final String FILE_NAME = "CommunicationDiagramTest.di";
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/AllCanonicalTests.java
new file mode 100644
index 00000000000..b90d31cb1b4
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/AllCanonicalTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.tests.canonical;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+
+/**
+ * All test in canonical package
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+// testTopNodes
+ TestCommunicationDiagramChildNode.class,
+ TestCommunicationDiagramLink.class
+})
+public class AllCanonicalTests {
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramChildNode.java
new file mode 100644
index 00000000000..6984b7d89bd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramChildNode.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.tests.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestChildNode;
+import org.eclipse.papyrus.junit.utils.classification.FailingTest;
+import org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.tests.ICommunicationDiagramTestsConstants;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramChildNode.
+ */
+public class TestCommunicationDiagramChildNode extends TestChildNode {
+
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return UMLDiagramUpdater.INSTANCE;
+ }
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return null;
+ }
+
+ @Override
+ public boolean isTestAffixedNode() {
+ return false;
+ }
+ @Override
+ protected String getProjectName() {
+ return ICommunicationDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return ICommunicationDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isSemanticTest() {
+ return false;
+ }
+ /**
+ * Test to manage Lifeline.
+ */
+ @Test
+ public void testToLifeline() {
+ testToManageNode(UMLElementTypes.Lifeline_8001, UMLPackage.eINSTANCE.getLifeline(), UMLElementTypes.Interaction_8002, false);
+ }
+ /**
+ * Test to manage Constraint.
+ */
+ @Test
+ public void testToConstraint() {
+ testToManageNode(UMLElementTypes.Constraint_8004, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Interaction_8002, false);
+ }
+ /**
+ * Test to manage Comment.
+ */
+ @Test
+ public void testToComment() {
+ testToManageNode(UMLElementTypes.Comment_8005, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Interaction_8002, false);
+ }
+ /**
+ * Test to manage TimeObservation.
+ */
+ @Test
+ @FailingTest
+ public void testToTimeObservation() {
+ testToManageNode(UMLElementTypes.TimeObservation_8006, UMLPackage.eINSTANCE.getTimeObservation(), UMLElementTypes.Interaction_8002, false);
+ }
+ /**
+ * Test to manage DurationObservation.
+ */
+ @Test
+ @FailingTest
+ public void testToDurationObservation() {
+ testToManageNode(UMLElementTypes.DurationObservation_8007, UMLPackage.eINSTANCE.getDurationObservation(), UMLElementTypes.Interaction_8002, false);
+ }
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateCommunicationDiagramCommand();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramLink.java
new file mode 100644
index 00000000000..909515d0748
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/canonical/TestCommunicationDiagramLink.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.tests.canonical;
+
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.papyrus.junit.utils.classification.InvalidTest;
+import org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.tests.ICommunicationDiagramTestsConstants;
+import org.junit.Test;
+
+/**
+ * The Class TestCommunicationDiagramLink use to test link that are contained by the owner of the target and the source
+ */
+public class TestCommunicationDiagramLink extends TestLink {
+
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return UMLDiagramUpdater.INSTANCE;
+ }
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateCommunicationDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return ICommunicationDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return ICommunicationDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ @InvalidTest
+ public void testToMessage() {
+ testToManageLink(UMLElementTypes.Lifeline_8001, UMLElementTypes.Lifeline_8001, UMLElementTypes.Message_8009, UMLElementTypes.Interaction_8002, false);
+ }
+
+}

Back to the top