Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrschnekenbu2013-07-04 09:48:37 +0000
committerrschnekenbu2013-07-04 09:48:37 +0000
commit11674a8ab31b21752e071ea1023e9f941e3a468c (patch)
tree67aabd62f56ff1d5e87bb55be88b00644a2aeb8b /tests
parent10037a0551348ab2b6632243c761008d9d23a2b0 (diff)
downloadorg.eclipse.papyrus-11674a8ab31b21752e071ea1023e9f941e3a468c.tar.gz
org.eclipse.papyrus-11674a8ab31b21752e071ea1023e9f941e3a468c.tar.xz
org.eclipse.papyrus-11674a8ab31b21752e071ea1023e9f941e3a468c.zip
412222: [Refactoring Tests] The Package diagram tests should be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=412222
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestCommentLink.java269
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestConstraintLink.java269
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java11
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF1
17 files changed, 149 insertions, 541 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 343f8985ee5..87f89fd2d9c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="0.10.0",
org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="0.10.0",
org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.diagram.pkg.tests;bundle-version="0.10.0",
org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="0.10.0",
org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="0.10.0",
org.eclipse.papyrus.core.queries.configuration.tests;bundle-version="0.10.0",
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index 05e2638f348..3259b495e33 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -80,6 +80,8 @@ public class AllTests {
/* uml idagrams */
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.diagram.clazz.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.activity.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.usecase.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.pkg.tests.AllTests.class));
//---- deactivate during test refactoring
//suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.timing.tests.AllTests.class));
@@ -88,7 +90,7 @@ public class AllTests {
// ---- end deactivate
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests.class));
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.interactionoverview.tests.AllTests.class)); //Disabled. They currently do not run on Hudson
- // suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.usecase.tests.AllTests.class)); //Disabled. They currently do not run on Hudson
+ //
//end
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java
new file mode 100644
index 00000000000..8bfeba855b6
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * 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.pkg.tests;
+
+public interface IPackageDiagramTestsConstants {
+
+ /** name of the test project */
+ public final String PROJECT_NAME = "PackageDiagramTestProject";
+
+ /** name of the test model */
+ public final String FILE_NAME = "PackageDiagramTest.di";
+} \ No newline at end of file
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestCommentLink.java
deleted file mode 100644
index f03fb8295fc..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestCommentLink.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*****************************************************************************
- * 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.pkg.tests.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.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestConstraintLink.java
deleted file mode 100644
index caf783f190d..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestConstraintLink.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*****************************************************************************
- * 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.pkg.tests.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.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java
index 9698ecae5c1..31c1536cc7b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java
@@ -18,6 +18,7 @@ import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.diagram.tests.canonical.TestChildNode;
import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;
@@ -36,6 +37,16 @@ public class TestPackageDiagramChildNode extends TestChildNode {
return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
}
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to manage model.
*/
@@ -67,5 +78,4 @@ public class TestPackageDiagramChildNode extends TestChildNode {
public void testToManageConstraint() {
testToManageNode(ElementTypes.CONSTRAINT_CN, UMLPackage.eINSTANCE.getConstraint(), ElementTypes.PACKAGE_CN, true);
}
-
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java
index 302bf683134..d21c858f1e4 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java
@@ -13,8 +13,10 @@
package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestCommentLink;
import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.junit.Test;
public class TestPackageDiagramCommentLink extends TestCommentLink {
@@ -23,7 +25,17 @@ public class TestPackageDiagramCommentLink extends TestCommentLink {
protected ICreationCommand getDiagramCommandCreation() {
return new PackageDiagramCreateCommand();
}
+
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to manage Comment
*/
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java
index df8535d0c42..39b49cd1c00 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java
@@ -13,8 +13,10 @@
package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestConstraintLink;
import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.junit.Test;
public class TestPackageDiagramConstraintLink extends TestConstraintLink {
@@ -23,6 +25,16 @@ public class TestPackageDiagramConstraintLink extends TestConstraintLink {
protected ICreationCommand getDiagramCommandCreation() {
return new PackageDiagramCreateCommand();
}
+
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
/**
* Test to manage Constraint
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java
index 06af70c7f8c..0f06f978284 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java
@@ -16,6 +16,7 @@ import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.diagram.tests.canonical.TestLinkOwnedBySource;
import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.junit.Test;
/**
@@ -28,6 +29,16 @@ public class TestPackageDiagramLink extends TestLinkOwnedBySource {
return new PackageDiagramCreateCommand();
}
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to manage Abstraction
*/
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java
index 0d34c9c8152..b9de67039b2 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java
@@ -18,6 +18,7 @@ import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.diagram.tests.canonical.TestTopNode;
import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;
@@ -35,6 +36,16 @@ public class TestPackageDiagramTopNode extends TestTopNode {
protected CreateViewRequest createViewRequestShapeContainer() {
return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
}
+
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
/**
* Test to manage model.
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java
index 2ea93689af9..84406c34705 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load100PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java
index 6296eb6dae4..1d2bfc31cd6 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load10PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java
index 13478d30047..7f93bdb8321 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load200PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java
index d5932e9d1a1..9a9681be913 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load300PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java
index cc8d5f1e862..27536b2ea0b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load400PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java
index e6253cf64e5..6f79565f0cc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java
@@ -18,6 +18,7 @@ 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.pkg.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
import org.junit.Test;
@@ -26,6 +27,16 @@ import org.junit.Test;
*/
public class Load500PackageTest extends AbstractPapyrusTestCase {
+ @Override
+ protected String getProjectName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IPackageDiagramTestsConstants.PROJECT_NAME;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
index 9accba8f953..507cfbeb4c0 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui,
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.uml.diagram.usecase;bundle-version="0.10.0",
org.eclipse.uml2.uml;bundle-version="4.0.0",
org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
org.eclipse.ui.ide;bundle-version="3.8.0",

Back to the top