Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrschnekenbu2013-06-13 09:49:00 +0000
committerrschnekenbu2013-06-13 09:49:00 +0000
commit3777b501c24891b3d2696d51683e0905753f6de9 (patch)
tree5b7c919907ab8ba0507533cab76c79f906f3269f /tests
parent5863df555e22bd87b069a7c022f497d66064d9fa (diff)
downloadorg.eclipse.papyrus-3777b501c24891b3d2696d51683e0905753f6de9.tar.gz
org.eclipse.papyrus-3777b501c24891b3d2696d51683e0905753f6de9.tar.xz
org.eclipse.papyrus-3777b501c24891b3d2696d51683e0905753f6de9.zip
Share project "org.eclipse.papyrus.uml.diagram.deployment.tests" into "svn+ssh://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.papyrus"
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF26
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties6
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/org.eclipse.papyrus.uml.diagram.deployment.test.launch41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/plugin.properties55
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/Activator.java64
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java35
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AbstractPapyrusTestCase.java28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AllCanonicalTests.java45
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestCommentLink.java269
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestConstraintLink.java269
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramChildNode.java105
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramCommentLink.java34
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramConstraintLink.java34
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramDeploymentLink.java39
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLink.java40
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLinkOwnedBySource.java39
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramManifestationLink.java39
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramTopNode.java103
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentLink.java243
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestManifestationLink.java243
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load1000NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load100NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load10NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load200NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load300NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load400NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load500NodeTest.java54
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/LoadTests.java40
32 files changed, 2245 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath
new file mode 100644
index 00000000000..9d5026e8ffd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project
new file mode 100644
index 00000000000..d206cb888d5
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.deployment.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.deployment.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.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.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..f9d6d82eeac
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.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.deployment.tests
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.editor;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.0",
+ org.eclipse.papyrus.diagram.tests;bundle-version="0.10.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.diagram.deployment;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Export-Package: org.eclipse.papyrus.uml.diagram.deployment.test,
+ org.eclipse.papyrus.uml.diagram.deployment.test.canonical,
+ org.eclipse.papyrus.uml.diagram.deployment.test.load
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.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.deployment.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties
new file mode 100644
index 00000000000..ebe02751cbb
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/org.eclipse.papyrus.uml.diagram.deployment.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/org.eclipse.papyrus.uml.diagram.deployment.test.launch
new file mode 100644
index 00000000000..ed81624256a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/org.eclipse.papyrus.uml.diagram.deployment.test.launch
@@ -0,0 +1,41 @@
+<?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"/>
+<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.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/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.deployment.test.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.deployment.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=256m -XX:MaxPermSize=1024m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<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.deployment.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/plugin.properties
new file mode 100644
index 00000000000..529d0860d2f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/plugin.properties
@@ -0,0 +1,55 @@
+pluginName=Papyrus Deployment Diagram (Incubation)
+providerName=Eclipse Modeling Project
+editorName=PapyrusUMLDeploymentDiagram Diagram Editing
+context.description=Papyrus UML Deployment Diagram Editing
+context.name=In Papyrus UML Deployment Diagram Editor
+newWizardName=PapyrusUMLDeploymentDiagram Diagram
+newWizardDesc=Creates PapyrusUMLDeploymentDiagram diagram.
+ initDiagramActionLabel=Initialize PapyrusUMLDeployment_diagram diagram file
+ navigatorContentName=*.PapyrusUMLDeployment_diagram diagram contents
+update.diagram.name=Update PapyrusUMLDeploymentDiagram diagram
+update.diagram.description=Perform PapyrusUMLDeploymentDiagram diagram update
+ tab.appearance=Appearance
+tab.diagram=Rulers & Grid
+tab.domain=Core
+ prefpage.org.eclipse.uml2.uml.diagram.general=UML Diagram
+prefpage.org.eclipse.uml2.uml.diagram.appearance=Appearance
+prefpage.org.eclipse.uml2.uml.diagram.connections=Connections
+prefpage.org.eclipse.uml2.uml.diagram.printing=Printing
+prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid=Rulers And Grid
+ metatype.name.Model_1000=DeploymentDiagram
+metatype.name.Comment_2001=Comment
+metatype.name.Constraint_2005=Constraint
+metatype.name.ExecutionEnvironment_2002=ExecutionEnvironment
+metatype.name.Device_2003=Device
+metatype.name.Artifact_2006=Artifact
+metatype.name.Node_2008=Node
+metatype.name.Node_23=Node
+metatype.name.Device_16=Device
+metatype.name.ExecutionEnvironment_21=ExecutionEnvironment
+metatype.name.Artifact_25=Artifact
+metatype.name.Artifact_28=Artifact
+metatype.name.Link_4005=Undefined
+metatype.name.CommentAnnotatedElement_4008=CommentAnnotatedElement
+metatype.name.ConstraintConstrainedElement_4009=ConstraintConstrainedElement
+metatype.name.Deployment_4001=Deployment
+metatype.name.Manifestation_4002=Manifestation
+metatype.name.Generalization_4003=Generalization
+metatype.name.Dependency_4004=Dependency
+ cmdcategory.name=PapyrusUMLDeploymentDiagram Editor Commands
+cmdcategory.desc=PapyrusUMLDeploymentDiagram Editor Commands
+
+metatype.name.Package_1000=DeploymentDiagram
+metatype.name.Dependency_2011=DependencyNode
+metatype.name.Model_2010=Model
+metatype.name.Package_2009=Package
+metatype.name.NamedElement_2012=DefaultNamedElement
+metatype.name.Model_49=Model
+metatype.name.Package_36=Package
+metatype.name.Device_44=Device
+metatype.name.ExecutionEnvironment_46=ExecutionEnvironment
+metatype.name.Node_42=Node
+metatype.name.Artifact_40=Artifact
+metatype.name.Comment_54=Comment
+metatype.name.Constraint_56=Constraint
+metatype.name.Dependency_4010=DependencyBranchLink
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/Activator.java
new file mode 100644
index 00000000000..ba97d024737
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test;
+
+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.deployment.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.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java
new file mode 100644
index 00000000000..ac40f230f4a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/AllTests.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test;
+
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AllCanonicalTests;
+import org.eclipse.papyrus.uml.diagram.deployment.test.load.LoadTests;
+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,
+
+// load
+//LoadTests.class
+//End
+})
+public class AllTests {
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AbstractPapyrusTestCase.java
new file mode 100644
index 00000000000..3ccbffbe299
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AbstractPapyrusTestCase.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AllCanonicalTests.java
new file mode 100644
index 00000000000..a8c29caf1a9
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/AllCanonicalTests.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.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({
+// Top Node
+TestDeploymentDiagramTopNode.class,
+// Child Node
+TestDeploymentDiagramChildNode.class,
+// Deployment Link
+TestDeploymentDiagramDeploymentLink.class,
+// Link by owned source
+TestDeploymentDiagramLinkOwnedBySource.class,
+// Comment link
+TestDeploymentDiagramCommentLink.class,
+// Cosntraint link
+TestDeploymentDiagramConstraintLink.class,
+// Manifestation Link
+TestDeploymentDiagramManifestationLink.class,
+// Others Link
+TestDeploymentDiagramLink.class,
+
+// End
+})
+public class AllCanonicalTests {
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestCommentLink.java
new file mode 100644
index 00000000000..1c90181df0a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestCommentLink.java
@@ -0,0 +1,269 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestCommentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestConstraintLink.java
new file mode 100644
index 00000000000..a7db247c99c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestConstraintLink.java
@@ -0,0 +1,269 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestConstraintLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramChildNode.java
new file mode 100644
index 00000000000..f3f647e8473
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramChildNode.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.deployment.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestChildNode;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestDepoloymentDiagramChildNode.
+ */
+
+public class TestDeploymentDiagramChildNode extends TestChildNode {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2009, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManagePackage() {
+ testToManageNode(UMLElementTypes.Package_36, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Model
+ */
+ @Test
+ public void testToManageModel() {
+ testToManageNode(UMLElementTypes.Model_49, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Node
+ */
+ @Test
+ public void testToManageNode() {
+ testToManageNode(UMLElementTypes.Node_42, UMLPackage.eINSTANCE.getNode(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Artifact
+ */
+ @Test
+ public void testToManageArtifact() {
+ testToManageNode(UMLElementTypes.Artifact_40, UMLPackage.eINSTANCE.getArtifact(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage device
+ */
+ @Test
+ public void testToManageDevice() {
+ testToManageNode(UMLElementTypes.Device_44, UMLPackage.eINSTANCE.getDevice(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Execution Environment
+ */
+ @Test
+ public void testToManageExecutionEnvironment() {
+ testToManageNode(UMLElementTypes.ExecutionEnvironment_46, UMLPackage.eINSTANCE.getExecutionEnvironment(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageNode(UMLElementTypes.Comment_54, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_36, true);
+ }
+
+ /**
+ * Test to manage Constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageNode(UMLElementTypes.Constraint_56, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_36, true);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramCommentLink.java
new file mode 100644
index 00000000000..62f98ad67bf
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramCommentLink.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+public class TestDeploymentDiagramCommentLink extends TestCommentLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Comment
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageLink(UMLElementTypes.Comment_2001, UMLElementTypes.Package_2009, UMLElementTypes.CommentAnnotatedElement_4008, UMLElementTypes.Package_2009, true);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramConstraintLink.java
new file mode 100644
index 00000000000..d91471e0d51
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramConstraintLink.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+public class TestDeploymentDiagramConstraintLink extends TestConstraintLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Constraint
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageLink(UMLElementTypes.Constraint_2005, UMLElementTypes.Package_2009, UMLElementTypes.ConstraintConstrainedElement_4009, UMLElementTypes.Package_2009, true);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramDeploymentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramDeploymentLink.java
new file mode 100644
index 00000000000..ef7f2ecf4a0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramDeploymentLink.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * The Class TestComponentDiagramLink.
+ */
+public class TestDeploymentDiagramDeploymentLink extends TestDeploymentLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Deployment
+ */
+
+ @Test
+ public void testToManageDeployment() {
+ testToManageLink(UMLElementTypes.Node_2008, UMLElementTypes.Artifact_2006, UMLElementTypes.Deployment_4001, UMLElementTypes.Package_2009, true);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLink.java
new file mode 100644
index 00000000000..377686c2dba
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLink.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * The Class TestComponentDiagramLink.
+ */
+public class TestDeploymentDiagramLink extends TestLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Dependency
+ */
+
+ @Test
+ public void testToManageDependency() {
+ testToManageLink(UMLElementTypes.Node_2008, UMLElementTypes.Node_2008, UMLElementTypes.Dependency_4004, UMLElementTypes.Package_2009, true);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLinkOwnedBySource.java
new file mode 100644
index 00000000000..6d21cb46345
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramLinkOwnedBySource.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * 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:
+ * Nizar GUEDIDI (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLinkOwnedBySource;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * The Class TestComponentDiagramLink use to test link that are contained by the owner of the target and the source
+ */
+public class TestDeploymentDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Generalization
+ */
+ @Test
+ public void testToManageGeneralization() {
+ testToManageLink(UMLElementTypes.Node_2008, UMLElementTypes.Node_2008, UMLElementTypes.Generalization_4003, UMLElementTypes.Package_2009, true);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramManifestationLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramManifestationLink.java
new file mode 100644
index 00000000000..0ff8afb8548
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramManifestationLink.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * The Class TestComponentDiagramLink.
+ */
+public class TestDeploymentDiagramManifestationLink extends TestManifestationLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ /**
+ * Test to manage Manifestation
+ */
+
+ @Test
+ public void testToManageManifestation() {
+ testToManageLink(UMLElementTypes.Artifact_2006, UMLElementTypes.Node_2008, UMLElementTypes.Manifestation_4002, UMLElementTypes.Package_2009, true);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramTopNode.java
new file mode 100644
index 00000000000..f6562ad18ce
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentDiagramTopNode.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestTopNode;
+import org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestDeploymentDiagramTopNode.
+ */
+public class TestDeploymentDiagramTopNode extends TestTopNode {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateDeploymentDiagramCommand();
+ }
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2009, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManageIPackage() {
+ testToManageNode(UMLElementTypes.Package_2009, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Model
+ */
+ @Test
+ public void testToManageModel() {
+ testToManageNode(UMLElementTypes.Model_2010, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Node
+ */
+ @Test
+ public void testToManageNode() {
+ testToManageNode(UMLElementTypes.Node_2008, UMLPackage.eINSTANCE.getNode(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Artifact
+ */
+ @Test
+ public void testToManageArtifact() {
+ testToManageNode(UMLElementTypes.Artifact_2006, UMLPackage.eINSTANCE.getArtifact(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage device
+ */
+ @Test
+ public void testToManageDevice() {
+ testToManageNode(UMLElementTypes.Device_2003, UMLPackage.eINSTANCE.getDevice(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Execution Environment
+ */
+ @Test
+ public void testToManageExecutionEnvironment() {
+ testToManageNode(UMLElementTypes.ExecutionEnvironment_2002, UMLPackage.eINSTANCE.getExecutionEnvironment(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageNode(UMLElementTypes.Comment_2001, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_2009, true);
+ }
+
+ /**
+ * Test to manage Constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageNode(UMLElementTypes.Constraint_2005, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_2009, true);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentLink.java
new file mode 100644
index 00000000000..0ee7319858b
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestDeploymentLink.java
@@ -0,0 +1,243 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestDeploymentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestManifestationLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestManifestationLink.java
new file mode 100644
index 00000000000..0b2b7fe3e5c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/canonical/TestManifestationLink.java
@@ -0,0 +1,243 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.canonical;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLink;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestManifestationLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load1000NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load1000NodeTest.java
new file mode 100644
index 00000000000..c56388dff75
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load1000NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load1000NodeTest.
+ */
+public class Load1000NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load1000 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 1000; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load100NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load100NodeTest.java
new file mode 100644
index 00000000000..bdc17c9428c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load100NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load100NodeTest.
+ */
+public class Load100NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load100 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 100; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load10NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load10NodeTest.java
new file mode 100644
index 00000000000..99202735efd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load10NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load10NodeTest.
+ */
+public class Load10NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load10 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 10; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load200NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load200NodeTest.java
new file mode 100644
index 00000000000..1c53319527b
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load200NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load200NodeTest.
+ */
+public class Load200NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load200 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 200; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load300NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load300NodeTest.java
new file mode 100644
index 00000000000..49c0006244a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load300NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load300NodeTest.
+ */
+public class Load300NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load300 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 300; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load400NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load400NodeTest.java
new file mode 100644
index 00000000000..f415b2634f2
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load400NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load400NodeTest.
+ */
+public class Load400NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load400 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 400; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load500NodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load500NodeTest.java
new file mode 100644
index 00000000000..82fad8e933f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load500NodeTest.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Test;
+
+/**
+ * The Class Load500NodeTest.
+ */
+public class Load500NodeTest extends AbstractPapyrusTestCase {
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ }
+
+ /**
+ * Test load500 node.
+ */
+ @Test
+ public void testLoad10Node() {
+ for(int i = 0; i < 500; i++) {
+ testToCreateANode(UMLElementTypes.Node_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/LoadTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/LoadTests.java
new file mode 100644
index 00000000000..87e0a83088e
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/LoadTests.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.deployment.test.load;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+// 10 Node
+Load10NodeTest.class,
+//100 Node
+Load100NodeTest.class,
+//200 Node
+Load200NodeTest.class,
+//300 Node
+Load300NodeTest.class,
+//400 Node
+Load400NodeTest.class,
+//500 Node
+Load500NodeTest.class,
+//1000 Node
+Load1000NodeTest.class, })
+public class LoadTests {
+
+}

Back to the top