Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2013-05-29 09:18:55 -0400
committerrschnekenbu2013-05-29 09:18:55 -0400
commit06bedfc00da9e5a73dd281ce81ff63f1febeaed0 (patch)
tree03068229502ab42469f9139a40938fc7774871d4
parent820723897cabe746cc541722c063e95aaa90ee44 (diff)
downloadorg.eclipse.papyrus-06bedfc00da9e5a73dd281ce81ff63f1febeaed0.tar.gz
org.eclipse.papyrus-06bedfc00da9e5a73dd281ce81ff63f1febeaed0.tar.xz
org.eclipse.papyrus-06bedfc00da9e5a73dd281ce81ff63f1febeaed0.zip
Add tests to requirement diagram for new link
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java4
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java8
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java36
3 files changed, 47 insertions, 1 deletions
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java
index 7386ccc8479..32ea5a32181 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java
@@ -32,7 +32,9 @@ TestRequirementDiagramCommentLink.class,
// Constraint Link
TestRequirementDiagramConstraintLink.class,
// Containment Link
-TestRequirementDiagramContainment.class, })
+TestRequirementDiagramContainment.class,
+// Link Owned By source
+TestRequirementDiagramLinkOwnedBySource.class })
public class AllCanonicalTests {
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
index 9f4e82ddb92..24aa7397399 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
@@ -44,4 +44,12 @@ public class TestRequirementDiagramLink extends TestLink {
testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.DEPENDENCY, ElementTypes.PACKAGE, true);
}
+ /**
+ * Test to manage Realization
+ */
+ @Test
+ public void testToManageRealization() {
+ testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.REALIZATION, ElementTypes.PACKAGE, true);
+ }
+
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
new file mode 100644
index 00000000000..f125155a5ae
--- /dev/null
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestLinkOwnedBySource;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.junit.Test;
+
+public class TestRequirementDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ /**
+ * Test to manage Package import
+ */
+ @Test
+ public void testToManagePackageImport() {
+ testToManageLink(ElementTypes.PACKAGE, ElementTypes.PACKAGE, ElementTypes.PACKAGE_IMPORT, ElementTypes.PACKAGE, true);
+ }
+
+}

Back to the top