| /* |
| * 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.Element; |
| import org.eclipse.uml2.uml.Image; |
| |
| /** |
| * @author Eike Stepper |
| */ |
| public class ImageTest |
| extends _Abstract_Compliance_Test_ { |
| |
| public void testEAnnotations() { |
| Image image = UML.createImage(); |
| assertValid(image); |
| |
| EAnnotation eAnnotation = ECORE.createEAnnotation(); |
| assertValid(eAnnotation); |
| image.getEAnnotations().add(eAnnotation); |
| } |
| |
| public void testOwnedComment() { |
| Image image = UML.createImage(); |
| assertValid(image); |
| |
| Comment comment = UML.createComment(); |
| assertValid(comment); |
| image.getOwnedComments().add(comment); |
| assertSuperset(image.getOwnedElements().contains(comment)); |
| } |
| |
| public void testOwnedElement() { |
| Image image = UML.createImage(); |
| assertValid(image); |
| EList<Element> elements = image.getOwnedElements(); |
| EList<Element> elements2 = image.getOwnedElements(); |
| assertSame(elements, elements2); |
| } |
| |
| } |