diff options
Diffstat (limited to 'tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/src/org/eclipse/papyrus/uml/diagram/deployment/test/load/Load300NodeTest.java')
-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.java | 136 |
1 files changed, 68 insertions, 68 deletions
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 index 7dde36cc8d2..a4ee9bd85b8 100644 --- 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 @@ -1,68 +1,68 @@ -/*****************************************************************************
- * 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 static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-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.IDeploymentDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load300NodeTest.
- */
-public class Load300NodeTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IDeploymentDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IDeploymentDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * 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_Shape);
- }
- }
-}
+/***************************************************************************** + * 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 static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +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.IDeploymentDiagramTestsConstants; +import org.eclipse.papyrus.uml.diagram.deployment.test.canonical.AbstractPapyrusTestCase; +import org.junit.Test; + +/** + * The Class Load300NodeTest. + */ +public class Load300NodeTest extends AbstractPapyrusTestCase { + + @Override + protected String getProjectName() { + return IDeploymentDiagramTestsConstants.PROJECT_NAME; + } + + @Override + protected String getFileName() { + return IDeploymentDiagramTestsConstants.FILE_NAME; + } + + /** + * 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_Shape); + } + } +} |