Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'cdo/tests/uml/org.eclipse.uml2.uml.cdo.tests/src/org/eclipse/uml2/uml/cdo/tests/compliance/GateTest.java')
-rwxr-xr-xcdo/tests/uml/org.eclipse.uml2.uml.cdo.tests/src/org/eclipse/uml2/uml/cdo/tests/compliance/GateTest.java84
1 files changed, 84 insertions, 0 deletions
diff --git a/cdo/tests/uml/org.eclipse.uml2.uml.cdo.tests/src/org/eclipse/uml2/uml/cdo/tests/compliance/GateTest.java b/cdo/tests/uml/org.eclipse.uml2.uml.cdo.tests/src/org/eclipse/uml2/uml/cdo/tests/compliance/GateTest.java
new file mode 100755
index 00000000..b35fdc5d
--- /dev/null
+++ b/cdo/tests/uml/org.eclipse.uml2.uml.cdo.tests/src/org/eclipse/uml2/uml/cdo/tests/compliance/GateTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018 CEA, and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.uml2.uml.cdo.tests.compliance;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EAnnotation;
+
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Gate;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.StringExpression;
+
+/**
+ * @author Eike Stepper
+ */
+public class GateTest
+ extends _Abstract_Compliance_Test_ {
+
+ public void testEAnnotations() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+
+ EAnnotation eAnnotation = ECORE.createEAnnotation();
+ assertValid(eAnnotation);
+ gate.getEAnnotations().add(eAnnotation);
+ }
+
+ public void testOwnedComment() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+
+ Comment comment = UML.createComment();
+ assertValid(comment);
+ gate.getOwnedComments().add(comment);
+ assertSuperset(gate.getOwnedElements().contains(comment));
+ }
+
+ public void testOwnedElement() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+ EList<Element> elements = gate.getOwnedElements();
+ EList<Element> elements2 = gate.getOwnedElements();
+ assertSame(elements, elements2);
+ }
+
+ public void testClientDependency() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+ EList<Dependency> dependencys = gate.getClientDependencies();
+ EList<Dependency> dependencys2 = gate.getClientDependencies();
+ assertSame(dependencys, dependencys2);
+ }
+
+ public void testNameExpression() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+
+ StringExpression stringExpression = UML.createStringExpression();
+ assertValid(stringExpression);
+ gate.setNameExpression(stringExpression);
+ assertSuperset(gate.getOwnedElements().contains(stringExpression));
+ }
+
+ public void testMessage() {
+ Gate gate = UML.createGate();
+ assertValid(gate);
+
+ Message message = UML.createMessage();
+ assertValid(message);
+ gate.setMessage(message);
+ }
+
+}

Back to the top