Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java')
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java80
1 files changed, 80 insertions, 0 deletions
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java
new file mode 100644
index 00000000000..f396a58c88a
--- /dev/null
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraintBlock4CB extends AbstractTest4CB {
+
+ public static View constraintBlockView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ constraintBlockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ if(constraintBlockView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintBlockView, true);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintBlockView, false);
+ }
+
+}

Back to the top