diff options
author | Vincent Lorenzo | 2016-05-27 16:07:05 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-05-30 11:21:43 +0000 |
commit | 58618d252701b2c250383fe095f666f62c7208bd (patch) | |
tree | 5153c604928b1674d46e6bdf39e65d3fc5a714fe /tests | |
parent | 630e72844ea911281736f420d5064ec55fa37f63 (diff) | |
download | org.eclipse.papyrus-58618d252701b2c250383fe095f666f62c7208bd.tar.gz org.eclipse.papyrus-58618d252701b2c250383fe095f666f62c7208bd.tar.xz org.eclipse.papyrus-58618d252701b2c250383fe095f666f62c7208bd.zip |
bug 492522: [All Diagrams] Delete from model on comment links does not work (does a delete from diagram) - fix context link tests on Class. the tests continue to fail for profile and statemachine diagram
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java index f863e936672..780d7fc782b 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java @@ -16,7 +16,9 @@ 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.requests.DropObjectsRequest;
+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.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Element;
@@ -59,6 +61,8 @@ public abstract class TestContextLink extends TestLink { testDropConstraint();
}
+ //FIXME : this override must be removed and fixed!
+ @Override
public void testViewDeletion(IElementType type) {
testDestroy(type);
}
@@ -72,8 +76,8 @@ public abstract class TestContextLink extends TestLink { assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, createdEdgesCount, getDiagramEditPart().getConnections().size());
ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = linkEditPart.getCommand(deleteViewRequest);
+ //Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = linkEditPart.getCommand((new EditCommandRequestWrapper(new DestroyElementRequest(false))));
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());
|