blob: c8aadedddb74c2513207c24132b217bdbf17c960 [file] [log] [blame]
/*
* 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.Activity;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.AssociationClass;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ClassifierTemplateParameter;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.CollaborationUse;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.CommunicationPath;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.ConnectableElement;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Deployment;
import org.eclipse.uml2.uml.DeploymentSpecification;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.ExtensionEnd;
import org.eclipse.uml2.uml.Feature;
import org.eclipse.uml2.uml.FunctionBehavior;
import org.eclipse.uml2.uml.Generalization;
import org.eclipse.uml2.uml.GeneralizationSet;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionConstraint;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.InterfaceRealization;
import org.eclipse.uml2.uml.IntervalConstraint;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.PackageImport;
import org.eclipse.uml2.uml.PackageableElement;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.ProtocolStateMachine;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.RedefinableElement;
import org.eclipse.uml2.uml.RedefinableTemplateSignature;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.StringExpression;
import org.eclipse.uml2.uml.Substitution;
import org.eclipse.uml2.uml.TemplateBinding;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UseCase;
/**
* @author Eike Stepper
*/
public class DeviceTest
extends _Abstract_Compliance_Test_ {
public void testEAnnotations() {
Device device = UML.createDevice();
assertValid(device);
EAnnotation eAnnotation = ECORE.createEAnnotation();
assertValid(eAnnotation);
device.getEAnnotations().add(eAnnotation);
}
public void testOwnedComment() {
Device device = UML.createDevice();
assertValid(device);
Comment comment = UML.createComment();
assertValid(comment);
device.getOwnedComments().add(comment);
assertSuperset(device.getOwnedElements().contains(comment));
}
public void testOwnedElement() {
Device device = UML.createDevice();
assertValid(device);
EList<Element> elements = device.getOwnedElements();
EList<Element> elements2 = device.getOwnedElements();
assertSame(elements, elements2);
}
public void testClientDependency() {
Device device = UML.createDevice();
assertValid(device);
EList<Dependency> dependencys = device.getClientDependencies();
EList<Dependency> dependencys2 = device.getClientDependencies();
assertSame(dependencys, dependencys2);
}
public void testNameExpression() {
Device device = UML.createDevice();
assertValid(device);
StringExpression stringExpression = UML.createStringExpression();
assertValid(stringExpression);
device.setNameExpression(stringExpression);
assertSuperset(device.getOwnedElements().contains(stringExpression));
}
public void testOwnedRule() {
Device device = UML.createDevice();
assertValid(device);
IntervalConstraint intervalConstraint = UML.createIntervalConstraint();
assertValid(intervalConstraint);
device.getOwnedRules().add(intervalConstraint);
assertSuperset(device.getOwnedMembers().contains(intervalConstraint));
TimeConstraint timeConstraint = UML.createTimeConstraint();
assertValid(timeConstraint);
device.getOwnedRules().add(timeConstraint);
assertSuperset(device.getOwnedMembers().contains(timeConstraint));
InteractionConstraint interactionConstraint = UML
.createInteractionConstraint();
assertValid(interactionConstraint);
device.getOwnedRules().add(interactionConstraint);
assertSuperset(
device.getOwnedMembers().contains(interactionConstraint));
Constraint constraint = UML.createConstraint();
assertValid(constraint);
device.getOwnedRules().add(constraint);
assertSuperset(device.getOwnedMembers().contains(constraint));
DurationConstraint durationConstraint = UML.createDurationConstraint();
assertValid(durationConstraint);
device.getOwnedRules().add(durationConstraint);
assertSuperset(device.getOwnedMembers().contains(durationConstraint));
}
public void testElementImport() {
Device device = UML.createDevice();
assertValid(device);
ElementImport elementImport = UML.createElementImport();
assertValid(elementImport);
device.getElementImports().add(elementImport);
assertSuperset(device.getOwnedElements().contains(elementImport));
}
public void testPackageImport() {
Device device = UML.createDevice();
assertValid(device);
PackageImport packageImport = UML.createPackageImport();
assertValid(packageImport);
device.getPackageImports().add(packageImport);
assertSuperset(device.getOwnedElements().contains(packageImport));
}
public void testOwnedMember() {
Device device = UML.createDevice();
assertValid(device);
EList<NamedElement> namedElements = device.getOwnedMembers();
EList<NamedElement> namedElements2 = device.getOwnedMembers();
assertSame(namedElements, namedElements2);
}
public void testImportedMember() {
Device device = UML.createDevice();
assertValid(device);
EList<PackageableElement> packageableElements = device
.getImportedMembers();
EList<PackageableElement> packageableElements2 = device
.getImportedMembers();
assertSame(packageableElements, packageableElements2);
}
public void testMember() {
Device device = UML.createDevice();
assertValid(device);
EList<NamedElement> namedElements = device.getMembers();
EList<NamedElement> namedElements2 = device.getMembers();
assertSame(namedElements, namedElements2);
}
public void testRedefinedElement() {
Device device = UML.createDevice();
assertValid(device);
EList<RedefinableElement> redefinableElements = device
.getRedefinedElements();
EList<RedefinableElement> redefinableElements2 = device
.getRedefinedElements();
assertSame(redefinableElements, redefinableElements2);
}
public void testRedefinitionContext() {
Device device = UML.createDevice();
assertValid(device);
EList<Classifier> classifiers = device.getRedefinitionContexts();
EList<Classifier> classifiers2 = device.getRedefinitionContexts();
assertSame(classifiers, classifiers2);
}
public void testOwningTemplateParameter() {
Device device = UML.createDevice();
assertValid(device);
ClassifierTemplateParameter classifierTemplateParameter = UML
.createClassifierTemplateParameter();
assertValid(classifierTemplateParameter);
device.setOwningTemplateParameter(classifierTemplateParameter);
assertSuperset(device.getOwner() == classifierTemplateParameter);
assertSuperset(
device.getTemplateParameter() == classifierTemplateParameter);
}
public void testTemplateParameter() {
Device device = UML.createDevice();
assertValid(device);
ClassifierTemplateParameter classifierTemplateParameter = UML
.createClassifierTemplateParameter();
assertValid(classifierTemplateParameter);
device.setTemplateParameter(classifierTemplateParameter);
}
public void testTemplateBinding() {
Device device = UML.createDevice();
assertValid(device);
TemplateBinding templateBinding = UML.createTemplateBinding();
assertValid(templateBinding);
device.getTemplateBindings().add(templateBinding);
assertSuperset(device.getOwnedElements().contains(templateBinding));
}
public void testOwnedTemplateSignature() {
Device device = UML.createDevice();
assertValid(device);
RedefinableTemplateSignature redefinableTemplateSignature = UML
.createRedefinableTemplateSignature();
assertValid(redefinableTemplateSignature);
device.setOwnedTemplateSignature(redefinableTemplateSignature);
assertSuperset(
device.getOwnedElements().contains(redefinableTemplateSignature));
}
public void testFeature() {
Device device = UML.createDevice();
assertValid(device);
EList<Feature> features = device.getFeatures();
EList<Feature> features2 = device.getFeatures();
assertSame(features, features2);
}
public void testAttribute() {
Device device = UML.createDevice();
assertValid(device);
EList<Property> propertys = device.getAttributes();
EList<Property> propertys2 = device.getAttributes();
assertSame(propertys, propertys2);
}
public void testCollaborationUse() {
Device device = UML.createDevice();
assertValid(device);
CollaborationUse collaborationUse = UML.createCollaborationUse();
assertValid(collaborationUse);
device.getCollaborationUses().add(collaborationUse);
assertSuperset(device.getOwnedElements().contains(collaborationUse));
}
public void testGeneral() {
Device device = UML.createDevice();
assertValid(device);
EList<Classifier> classifiers = device.getGenerals();
EList<Classifier> classifiers2 = device.getGenerals();
assertSame(classifiers, classifiers2);
}
public void testGeneralization() {
Device device = UML.createDevice();
assertValid(device);
Generalization generalization = UML.createGeneralization();
assertValid(generalization);
device.getGeneralizations().add(generalization);
assertSuperset(device.getOwnedElements().contains(generalization));
}
public void testPowertypeExtent() {
Device device = UML.createDevice();
assertValid(device);
GeneralizationSet generalizationSet = UML.createGeneralizationSet();
assertValid(generalizationSet);
device.getPowertypeExtents().add(generalizationSet);
}
public void testInheritedMember() {
Device device = UML.createDevice();
assertValid(device);
EList<NamedElement> namedElements = device.getInheritedMembers();
EList<NamedElement> namedElements2 = device.getInheritedMembers();
assertSame(namedElements, namedElements2);
}
public void testOwnedUseCase() {
Device device = UML.createDevice();
assertValid(device);
UseCase useCase = UML.createUseCase();
assertValid(useCase);
device.getOwnedUseCases().add(useCase);
assertSuperset(device.getOwnedMembers().contains(useCase));
}
public void testUseCase() {
Device device = UML.createDevice();
assertValid(device);
UseCase useCase = UML.createUseCase();
assertValid(useCase);
device.getUseCases().add(useCase);
}
public void testRedefinedClassifier() {
Device device = UML.createDevice();
assertValid(device);
FunctionBehavior functionBehavior = UML.createFunctionBehavior();
assertValid(functionBehavior);
device.getRedefinedClassifiers().add(functionBehavior);
assertSuperset(
device.getRedefinedElements().contains(functionBehavior));
Activity activity = UML.createActivity();
assertValid(activity);
device.getRedefinedClassifiers().add(activity);
assertSuperset(device.getRedefinedElements().contains(activity));
Interface interface_ = UML.createInterface();
assertValid(interface_);
device.getRedefinedClassifiers().add(interface_);
assertSuperset(device.getRedefinedElements().contains(interface_));
InformationItem informationItem = UML.createInformationItem();
assertValid(informationItem);
device.getRedefinedClassifiers().add(informationItem);
assertSuperset(device.getRedefinedElements().contains(informationItem));
CommunicationPath communicationPath = UML.createCommunicationPath();
assertValid(communicationPath);
device.getRedefinedClassifiers().add(communicationPath);
assertSuperset(
device.getRedefinedElements().contains(communicationPath));
ExecutionEnvironment executionEnvironment = UML
.createExecutionEnvironment();
assertValid(executionEnvironment);
device.getRedefinedClassifiers().add(executionEnvironment);
assertSuperset(
device.getRedefinedElements().contains(executionEnvironment));
Component component = UML.createComponent();
assertValid(component);
device.getRedefinedClassifiers().add(component);
assertSuperset(device.getRedefinedElements().contains(component));
Interaction interaction = UML.createInteraction();
assertValid(interaction);
device.getRedefinedClassifiers().add(interaction);
assertSuperset(device.getRedefinedElements().contains(interaction));
DeploymentSpecification deploymentSpecification = UML
.createDeploymentSpecification();
assertValid(deploymentSpecification);
device.getRedefinedClassifiers().add(deploymentSpecification);
assertSuperset(
device.getRedefinedElements().contains(deploymentSpecification));
OpaqueBehavior opaqueBehavior = UML.createOpaqueBehavior();
assertValid(opaqueBehavior);
device.getRedefinedClassifiers().add(opaqueBehavior);
assertSuperset(device.getRedefinedElements().contains(opaqueBehavior));
Association association = UML.createAssociation();
assertValid(association);
device.getRedefinedClassifiers().add(association);
assertSuperset(device.getRedefinedElements().contains(association));
DataType dataType = UML.createDataType();
assertValid(dataType);
device.getRedefinedClassifiers().add(dataType);
assertSuperset(device.getRedefinedElements().contains(dataType));
Device device2 = UML.createDevice();
assertValid(device2);
device.getRedefinedClassifiers().add(device2);
assertSuperset(device.getRedefinedElements().contains(device2));
Extension extension = UML.createExtension();
assertValid(extension);
device.getRedefinedClassifiers().add(extension);
assertSuperset(device.getRedefinedElements().contains(extension));
AssociationClass associationClass = UML.createAssociationClass();
assertValid(associationClass);
device.getRedefinedClassifiers().add(associationClass);
assertSuperset(
device.getRedefinedElements().contains(associationClass));
org.eclipse.uml2.uml.Class class_ = UML.createClass();
assertValid(class_);
device.getRedefinedClassifiers().add(class_);
assertSuperset(device.getRedefinedElements().contains(class_));
Enumeration enumeration = UML.createEnumeration();
assertValid(enumeration);
device.getRedefinedClassifiers().add(enumeration);
assertSuperset(device.getRedefinedElements().contains(enumeration));
PrimitiveType primitiveType = UML.createPrimitiveType();
assertValid(primitiveType);
device.getRedefinedClassifiers().add(primitiveType);
assertSuperset(device.getRedefinedElements().contains(primitiveType));
Actor actor = UML.createActor();
assertValid(actor);
device.getRedefinedClassifiers().add(actor);
assertSuperset(device.getRedefinedElements().contains(actor));
ProtocolStateMachine protocolStateMachine = UML
.createProtocolStateMachine();
assertValid(protocolStateMachine);
device.getRedefinedClassifiers().add(protocolStateMachine);
assertSuperset(
device.getRedefinedElements().contains(protocolStateMachine));
UseCase useCase = UML.createUseCase();
assertValid(useCase);
device.getRedefinedClassifiers().add(useCase);
assertSuperset(device.getRedefinedElements().contains(useCase));
Signal signal = UML.createSignal();
assertValid(signal);
device.getRedefinedClassifiers().add(signal);
assertSuperset(device.getRedefinedElements().contains(signal));
Node node = UML.createNode();
assertValid(node);
device.getRedefinedClassifiers().add(node);
assertSuperset(device.getRedefinedElements().contains(node));
Stereotype stereotype = UML.createStereotype();
assertValid(stereotype);
device.getRedefinedClassifiers().add(stereotype);
assertSuperset(device.getRedefinedElements().contains(stereotype));
StateMachine stateMachine = UML.createStateMachine();
assertValid(stateMachine);
device.getRedefinedClassifiers().add(stateMachine);
assertSuperset(device.getRedefinedElements().contains(stateMachine));
Artifact artifact = UML.createArtifact();
assertValid(artifact);
device.getRedefinedClassifiers().add(artifact);
assertSuperset(device.getRedefinedElements().contains(artifact));
Collaboration collaboration = UML.createCollaboration();
assertValid(collaboration);
device.getRedefinedClassifiers().add(collaboration);
assertSuperset(device.getRedefinedElements().contains(collaboration));
}
public void testRepresentation() {
Device device = UML.createDevice();
assertValid(device);
CollaborationUse collaborationUse = UML.createCollaborationUse();
assertValid(collaborationUse);
device.setRepresentation(collaborationUse);
assertSuperset(
device.getCollaborationUses().contains(collaborationUse));
}
public void testSubstitution() {
Device device = UML.createDevice();
assertValid(device);
Substitution substitution = UML.createSubstitution();
assertValid(substitution);
device.getSubstitutions().add(substitution);
assertSuperset(device.getOwnedElements().contains(substitution));
assertSuperset(device.getClientDependencies().contains(substitution));
}
public void testOwnedAttribute() {
Device device = UML.createDevice();
assertValid(device);
Port port = UML.createPort();
assertValid(port);
device.getOwnedAttributes().add(port);
assertSuperset(device.getAttributes().contains(port));
assertSuperset(device.getOwnedMembers().contains(port));
assertSuperset(device.getRoles().contains(port));
ExtensionEnd extensionEnd = UML.createExtensionEnd();
assertValid(extensionEnd);
device.getOwnedAttributes().add(extensionEnd);
assertSuperset(device.getAttributes().contains(extensionEnd));
assertSuperset(device.getOwnedMembers().contains(extensionEnd));
assertSuperset(device.getRoles().contains(extensionEnd));
Property property = UML.createProperty();
assertValid(property);
device.getOwnedAttributes().add(property);
assertSuperset(device.getAttributes().contains(property));
assertSuperset(device.getOwnedMembers().contains(property));
assertSuperset(device.getRoles().contains(property));
}
public void testOwnedConnector() {
Device device = UML.createDevice();
assertValid(device);
Connector connector = UML.createConnector();
assertValid(connector);
device.getOwnedConnectors().add(connector);
assertSuperset(device.getFeatures().contains(connector));
assertSuperset(device.getOwnedMembers().contains(connector));
}
public void testPart() {
Device device = UML.createDevice();
assertValid(device);
EList<Property> propertys = device.getParts();
EList<Property> propertys2 = device.getParts();
assertSame(propertys, propertys2);
}
public void testRole() {
Device device = UML.createDevice();
assertValid(device);
EList<ConnectableElement> connectableElements = device.getRoles();
EList<ConnectableElement> connectableElements2 = device.getRoles();
assertSame(connectableElements, connectableElements2);
}
public void testOwnedPort() {
Device device = UML.createDevice();
assertValid(device);
EList<Port> ports = device.getOwnedPorts();
EList<Port> ports2 = device.getOwnedPorts();
assertSame(ports, ports2);
}
public void testClassifierBehavior() {
Device device = UML.createDevice();
assertValid(device);
ProtocolStateMachine protocolStateMachine = UML
.createProtocolStateMachine();
assertValid(protocolStateMachine);
device.setClassifierBehavior(protocolStateMachine);
assertSuperset(
device.getOwnedBehaviors().contains(protocolStateMachine));
StateMachine stateMachine = UML.createStateMachine();
assertValid(stateMachine);
device.setClassifierBehavior(stateMachine);
assertSuperset(device.getOwnedBehaviors().contains(stateMachine));
}
public void testInterfaceRealization() {
Device device = UML.createDevice();
assertValid(device);
InterfaceRealization interfaceRealization = UML
.createInterfaceRealization();
assertValid(interfaceRealization);
device.getInterfaceRealizations().add(interfaceRealization);
assertSuperset(
device.getOwnedElements().contains(interfaceRealization));
assertSuperset(
device.getClientDependencies().contains(interfaceRealization));
}
public void testOwnedBehavior() {
Device device = UML.createDevice();
assertValid(device);
ProtocolStateMachine protocolStateMachine = UML
.createProtocolStateMachine();
assertValid(protocolStateMachine);
device.getOwnedBehaviors().add(protocolStateMachine);
assertSuperset(device.getOwnedMembers().contains(protocolStateMachine));
StateMachine stateMachine = UML.createStateMachine();
assertValid(stateMachine);
device.getOwnedBehaviors().add(stateMachine);
assertSuperset(device.getOwnedMembers().contains(stateMachine));
}
public void testOwnedOperation() {
Device device = UML.createDevice();
assertValid(device);
Operation operation = UML.createOperation();
assertValid(operation);
device.getOwnedOperations().add(operation);
assertSuperset(device.getFeatures().contains(operation));
assertSuperset(device.getOwnedMembers().contains(operation));
}
public void testExtension() {
Device device = UML.createDevice();
assertValid(device);
EList<Extension> extensions = device.getExtensions();
EList<Extension> extensions2 = device.getExtensions();
assertSame(extensions, extensions2);
}
public void testNestedClassifier() {
Device device = UML.createDevice();
assertValid(device);
FunctionBehavior functionBehavior = UML.createFunctionBehavior();
assertValid(functionBehavior);
device.getNestedClassifiers().add(functionBehavior);
assertSuperset(device.getOwnedMembers().contains(functionBehavior));
Activity activity = UML.createActivity();
assertValid(activity);
device.getNestedClassifiers().add(activity);
assertSuperset(device.getOwnedMembers().contains(activity));
Interface interface_ = UML.createInterface();
assertValid(interface_);
device.getNestedClassifiers().add(interface_);
assertSuperset(device.getOwnedMembers().contains(interface_));
InformationItem informationItem = UML.createInformationItem();
assertValid(informationItem);
device.getNestedClassifiers().add(informationItem);
assertSuperset(device.getOwnedMembers().contains(informationItem));
CommunicationPath communicationPath = UML.createCommunicationPath();
assertValid(communicationPath);
device.getNestedClassifiers().add(communicationPath);
assertSuperset(device.getOwnedMembers().contains(communicationPath));
ExecutionEnvironment executionEnvironment = UML
.createExecutionEnvironment();
assertValid(executionEnvironment);
device.getNestedClassifiers().add(executionEnvironment);
assertSuperset(device.getOwnedMembers().contains(executionEnvironment));
Component component = UML.createComponent();
assertValid(component);
device.getNestedClassifiers().add(component);
assertSuperset(device.getOwnedMembers().contains(component));
Interaction interaction = UML.createInteraction();
assertValid(interaction);
device.getNestedClassifiers().add(interaction);
assertSuperset(device.getOwnedMembers().contains(interaction));
DeploymentSpecification deploymentSpecification = UML
.createDeploymentSpecification();
assertValid(deploymentSpecification);
device.getNestedClassifiers().add(deploymentSpecification);
assertSuperset(
device.getOwnedMembers().contains(deploymentSpecification));
OpaqueBehavior opaqueBehavior = UML.createOpaqueBehavior();
assertValid(opaqueBehavior);
device.getNestedClassifiers().add(opaqueBehavior);
assertSuperset(device.getOwnedMembers().contains(opaqueBehavior));
Association association = UML.createAssociation();
assertValid(association);
device.getNestedClassifiers().add(association);
assertSuperset(device.getOwnedMembers().contains(association));
DataType dataType = UML.createDataType();
assertValid(dataType);
device.getNestedClassifiers().add(dataType);
assertSuperset(device.getOwnedMembers().contains(dataType));
Device device2 = UML.createDevice();
assertValid(device2);
device.getNestedClassifiers().add(device2);
assertSuperset(device.getOwnedMembers().contains(device2));
Extension extension = UML.createExtension();
assertValid(extension);
device.getNestedClassifiers().add(extension);
assertSuperset(device.getOwnedMembers().contains(extension));
AssociationClass associationClass = UML.createAssociationClass();
assertValid(associationClass);
device.getNestedClassifiers().add(associationClass);
assertSuperset(device.getOwnedMembers().contains(associationClass));
org.eclipse.uml2.uml.Class class_ = UML.createClass();
assertValid(class_);
device.getNestedClassifiers().add(class_);
assertSuperset(device.getOwnedMembers().contains(class_));
Enumeration enumeration = UML.createEnumeration();
assertValid(enumeration);
device.getNestedClassifiers().add(enumeration);
assertSuperset(device.getOwnedMembers().contains(enumeration));
PrimitiveType primitiveType = UML.createPrimitiveType();
assertValid(primitiveType);
device.getNestedClassifiers().add(primitiveType);
assertSuperset(device.getOwnedMembers().contains(primitiveType));
Actor actor = UML.createActor();
assertValid(actor);
device.getNestedClassifiers().add(actor);
assertSuperset(device.getOwnedMembers().contains(actor));
ProtocolStateMachine protocolStateMachine = UML
.createProtocolStateMachine();
assertValid(protocolStateMachine);
device.getNestedClassifiers().add(protocolStateMachine);
assertSuperset(device.getOwnedMembers().contains(protocolStateMachine));
UseCase useCase = UML.createUseCase();
assertValid(useCase);
device.getNestedClassifiers().add(useCase);
assertSuperset(device.getOwnedMembers().contains(useCase));
Signal signal = UML.createSignal();
assertValid(signal);
device.getNestedClassifiers().add(signal);
assertSuperset(device.getOwnedMembers().contains(signal));
Node node = UML.createNode();
assertValid(node);
device.getNestedClassifiers().add(node);
assertSuperset(device.getOwnedMembers().contains(node));
Stereotype stereotype = UML.createStereotype();
assertValid(stereotype);
device.getNestedClassifiers().add(stereotype);
assertSuperset(device.getOwnedMembers().contains(stereotype));
StateMachine stateMachine = UML.createStateMachine();
assertValid(stateMachine);
device.getNestedClassifiers().add(stateMachine);
assertSuperset(device.getOwnedMembers().contains(stateMachine));
Artifact artifact = UML.createArtifact();
assertValid(artifact);
device.getNestedClassifiers().add(artifact);
assertSuperset(device.getOwnedMembers().contains(artifact));
Collaboration collaboration = UML.createCollaboration();
assertValid(collaboration);
device.getNestedClassifiers().add(collaboration);
assertSuperset(device.getOwnedMembers().contains(collaboration));
}
public void testOwnedReception() {
Device device = UML.createDevice();
assertValid(device);
Reception reception = UML.createReception();
assertValid(reception);
device.getOwnedReceptions().add(reception);
assertSuperset(device.getFeatures().contains(reception));
assertSuperset(device.getOwnedMembers().contains(reception));
}
public void testSuperClass() {
Device device = UML.createDevice();
assertValid(device);
EList<org.eclipse.uml2.uml.Class> class_s = device.getSuperClasses();
EList<org.eclipse.uml2.uml.Class> class_s2 = device.getSuperClasses();
assertSame(class_s, class_s2);
}
public void testDeployedElement() {
Device device = UML.createDevice();
assertValid(device);
EList<PackageableElement> packageableElements = device
.getDeployedElements();
EList<PackageableElement> packageableElements2 = device
.getDeployedElements();
assertSame(packageableElements, packageableElements2);
}
public void testDeployment() {
Device device = UML.createDevice();
assertValid(device);
Deployment deployment = UML.createDeployment();
assertValid(deployment);
device.getDeployments().add(deployment);
assertSuperset(device.getOwnedElements().contains(deployment));
assertSuperset(device.getClientDependencies().contains(deployment));
}
public void testNestedNode() {
Device device = UML.createDevice();
assertValid(device);
Node node = UML.createNode();
assertValid(node);
device.getNestedNodes().add(node);
assertSuperset(device.getOwnedMembers().contains(node));
ExecutionEnvironment executionEnvironment = UML
.createExecutionEnvironment();
assertValid(executionEnvironment);
device.getNestedNodes().add(executionEnvironment);
assertSuperset(device.getOwnedMembers().contains(executionEnvironment));
Device device2 = UML.createDevice();
assertValid(device2);
device.getNestedNodes().add(device2);
assertSuperset(device.getOwnedMembers().contains(device2));
}
}