Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOnder GURCAN2015-10-12 09:14:35 +0000
committerOnder Gurcan2015-10-13 09:47:44 +0000
commitcb1250bac400b91394144552c0ee603087c33b4c (patch)
tree6e1c29d28cb78c98045e53c760f0ce2013d2d0d8 /tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse
parent9e292027f55c255e3e787105153e25f08bc6bd55 (diff)
downloadorg.eclipse.papyrus-rt-cb1250bac400b91394144552c0ee603087c33b4c.tar.gz
org.eclipse.papyrus-rt-cb1250bac400b91394144552c0ee603087c33b4c.tar.xz
org.eclipse.papyrus-rt-cb1250bac400b91394144552c0ee603087c33b4c.zip
Bug 475709 - [Tooling] Manage Protocol containment invariance
Change-Id: Ide1aa1f0345c8523561f823cca9c16c43cd2608f Signed-off-by: Onder GURCAN <onder.gurcan@cea.fr>
Diffstat (limited to 'tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse')
-rw-r--r--tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/creation/CreateElementTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/creation/CreateElementTest.java b/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/creation/CreateElementTest.java
index c30cacc93..1fb33f920 100644
--- a/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/creation/CreateElementTest.java
+++ b/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/creation/CreateElementTest.java
@@ -217,6 +217,21 @@ public class CreateElementTest extends AbstractPapyrusTest {
// test not creation of EnumerationLiteral in that package
runNotCreationTest(newEnumeration, UMLElementTypes.OPERATION, true);
}
+
+ @Test
+ public void testCreateProtocolInModel() throws Exception {
+ runCreationTest(rootModel, UMLRTElementTypesEnumerator.PROTOCOL, true);
+ }
+
+ @Test
+ public void testNotCreateProtocolInClassifier() throws Exception {
+ // create a package in the root model
+ CreateElementCommand command = new CreateElementCommand(new CreateElementRequest(rootModel, UMLElementTypes.CLASS));
+ command.execute(null, null);
+ EObject newClassifier = command.getNewElement();
+ // test not creation of EnumerationLiteral in that package
+ runNotCreationTest(newClassifier, UMLRTElementTypesEnumerator.PROTOCOL, true);
+ }
protected void runNotCreationTest(EObject owner, IHintedType hintedType, boolean canCreate) throws Exception {
Assert.assertTrue("Editor should not be dirty before test", !openPapyrusEditor.isDirty());

Back to the top