blob: 1cdb50fc21059d33daf1abdcb45847a52d38a108 [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.Collaboration;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.CommunicationPath;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.ConnectableElementTemplateParameter;
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.Duration;
import org.eclipse.uml2.uml.DurationInterval;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Expression;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.ExtensionEnd;
import org.eclipse.uml2.uml.FunctionBehavior;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.InstanceValue;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Interval;
import org.eclipse.uml2.uml.LiteralBoolean;
import org.eclipse.uml2.uml.LiteralInteger;
import org.eclipse.uml2.uml.LiteralNull;
import org.eclipse.uml2.uml.LiteralReal;
import org.eclipse.uml2.uml.LiteralString;
import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.OpaqueExpression;
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.RedefinableElement;
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.TimeExpression;
import org.eclipse.uml2.uml.TimeInterval;
import org.eclipse.uml2.uml.UseCase;
/**
* @author Eike Stepper
*/
public class PropertyTest
extends _Abstract_Compliance_Test_ {
public void testEAnnotations() {
Property property = UML.createProperty();
assertValid(property);
EAnnotation eAnnotation = ECORE.createEAnnotation();
assertValid(eAnnotation);
property.getEAnnotations().add(eAnnotation);
}
public void testOwnedComment() {
Property property = UML.createProperty();
assertValid(property);
Comment comment = UML.createComment();
assertValid(comment);
property.getOwnedComments().add(comment);
assertSuperset(property.getOwnedElements().contains(comment));
}
public void testOwnedElement() {
Property property = UML.createProperty();
assertValid(property);
EList<Element> elements = property.getOwnedElements();
EList<Element> elements2 = property.getOwnedElements();
assertSame(elements, elements2);
}
public void testClientDependency() {
Property property = UML.createProperty();
assertValid(property);
EList<Dependency> dependencys = property.getClientDependencies();
EList<Dependency> dependencys2 = property.getClientDependencies();
assertSame(dependencys, dependencys2);
}
public void testNameExpression() {
Property property = UML.createProperty();
assertValid(property);
StringExpression stringExpression = UML.createStringExpression();
assertValid(stringExpression);
property.setNameExpression(stringExpression);
assertSuperset(property.getOwnedElements().contains(stringExpression));
}
public void testRedefinedElement() {
Property property = UML.createProperty();
assertValid(property);
EList<RedefinableElement> redefinableElements = property
.getRedefinedElements();
EList<RedefinableElement> redefinableElements2 = property
.getRedefinedElements();
assertSame(redefinableElements, redefinableElements2);
}
public void testRedefinitionContext() {
Property property = UML.createProperty();
assertValid(property);
EList<Classifier> classifiers = property.getRedefinitionContexts();
EList<Classifier> classifiers2 = property.getRedefinitionContexts();
assertSame(classifiers, classifiers2);
}
public void testFeaturingClassifier() {
Property property = UML.createProperty();
assertValid(property);
EList<Classifier> classifiers = property.getFeaturingClassifiers();
EList<Classifier> classifiers2 = property.getFeaturingClassifiers();
assertSame(classifiers, classifiers2);
}
public void testType() {
Property property = UML.createProperty();
assertValid(property);
FunctionBehavior functionBehavior = UML.createFunctionBehavior();
assertValid(functionBehavior);
property.setType(functionBehavior);
Activity activity = UML.createActivity();
assertValid(activity);
property.setType(activity);
Property property2 = UML.createProperty();
assertValid(property2);
Interface interface_ = UML.createInterface();
assertValid(interface_);
property2.setType(interface_);
InformationItem informationItem = UML.createInformationItem();
assertValid(informationItem);
property2.setType(informationItem);
Property property3 = UML.createProperty();
assertValid(property3);
CommunicationPath communicationPath = UML.createCommunicationPath();
assertValid(communicationPath);
property3.setType(communicationPath);
ExecutionEnvironment executionEnvironment = UML
.createExecutionEnvironment();
assertValid(executionEnvironment);
property3.setType(executionEnvironment);
Property property4 = UML.createProperty();
assertValid(property4);
Component component = UML.createComponent();
assertValid(component);
property4.setType(component);
Interaction interaction = UML.createInteraction();
assertValid(interaction);
property4.setType(interaction);
Property property5 = UML.createProperty();
assertValid(property5);
DeploymentSpecification deploymentSpecification = UML
.createDeploymentSpecification();
assertValid(deploymentSpecification);
property5.setType(deploymentSpecification);
OpaqueBehavior opaqueBehavior = UML.createOpaqueBehavior();
assertValid(opaqueBehavior);
property5.setType(opaqueBehavior);
Property property6 = UML.createProperty();
assertValid(property6);
Association association = UML.createAssociation();
assertValid(association);
property6.setType(association);
DataType dataType = UML.createDataType();
assertValid(dataType);
property6.setType(dataType);
Property property7 = UML.createProperty();
assertValid(property7);
Device device = UML.createDevice();
assertValid(device);
property7.setType(device);
Extension extension = UML.createExtension();
assertValid(extension);
property7.setType(extension);
Property property8 = UML.createProperty();
assertValid(property8);
AssociationClass associationClass = UML.createAssociationClass();
assertValid(associationClass);
property8.setType(associationClass);
org.eclipse.uml2.uml.Class class_ = UML.createClass();
assertValid(class_);
property8.setType(class_);
Property property9 = UML.createProperty();
assertValid(property9);
Enumeration enumeration = UML.createEnumeration();
assertValid(enumeration);
property9.setType(enumeration);
PrimitiveType primitiveType = UML.createPrimitiveType();
assertValid(primitiveType);
property9.setType(primitiveType);
Property property10 = UML.createProperty();
assertValid(property10);
Actor actor = UML.createActor();
assertValid(actor);
property10.setType(actor);
ProtocolStateMachine protocolStateMachine = UML
.createProtocolStateMachine();
assertValid(protocolStateMachine);
property10.setType(protocolStateMachine);
Property property11 = UML.createProperty();
assertValid(property11);
UseCase useCase = UML.createUseCase();
assertValid(useCase);
property11.setType(useCase);
Signal signal = UML.createSignal();
assertValid(signal);
property11.setType(signal);
Property property12 = UML.createProperty();
assertValid(property12);
Node node = UML.createNode();
assertValid(node);
property12.setType(node);
Stereotype stereotype = UML.createStereotype();
assertValid(stereotype);
property12.setType(stereotype);
Property property13 = UML.createProperty();
assertValid(property13);
StateMachine stateMachine = UML.createStateMachine();
assertValid(stateMachine);
property13.setType(stateMachine);
Artifact artifact = UML.createArtifact();
assertValid(artifact);
property13.setType(artifact);
Property property14 = UML.createProperty();
assertValid(property14);
Collaboration collaboration = UML.createCollaboration();
assertValid(collaboration);
property14.setType(collaboration);
}
public void testLowerValue() {
Property property = UML.createProperty();
assertValid(property);
LiteralBoolean literalBoolean = UML.createLiteralBoolean();
assertValid(literalBoolean);
property.setLowerValue(literalBoolean);
assertSuperset(property.getOwnedElements().contains(literalBoolean));
Interval interval = UML.createInterval();
assertValid(interval);
property.setLowerValue(interval);
assertSuperset(property.getOwnedElements().contains(interval));
Property property2 = UML.createProperty();
assertValid(property2);
OpaqueExpression opaqueExpression = UML.createOpaqueExpression();
assertValid(opaqueExpression);
property2.setLowerValue(opaqueExpression);
assertSuperset(property2.getOwnedElements().contains(opaqueExpression));
Expression expression = UML.createExpression();
assertValid(expression);
property2.setLowerValue(expression);
assertSuperset(property2.getOwnedElements().contains(expression));
Property property3 = UML.createProperty();
assertValid(property3);
LiteralReal literalReal = UML.createLiteralReal();
assertValid(literalReal);
property3.setLowerValue(literalReal);
assertSuperset(property3.getOwnedElements().contains(literalReal));
LiteralString literalString = UML.createLiteralString();
assertValid(literalString);
property3.setLowerValue(literalString);
assertSuperset(property3.getOwnedElements().contains(literalString));
Property property4 = UML.createProperty();
assertValid(property4);
LiteralNull literalNull = UML.createLiteralNull();
assertValid(literalNull);
property4.setLowerValue(literalNull);
assertSuperset(property4.getOwnedElements().contains(literalNull));
Duration duration = UML.createDuration();
assertValid(duration);
property4.setLowerValue(duration);
assertSuperset(property4.getOwnedElements().contains(duration));
Property property5 = UML.createProperty();
assertValid(property5);
LiteralInteger literalInteger = UML.createLiteralInteger();
assertValid(literalInteger);
property5.setLowerValue(literalInteger);
assertSuperset(property5.getOwnedElements().contains(literalInteger));
DurationInterval durationInterval = UML.createDurationInterval();
assertValid(durationInterval);
property5.setLowerValue(durationInterval);
assertSuperset(property5.getOwnedElements().contains(durationInterval));
Property property6 = UML.createProperty();
assertValid(property6);
StringExpression stringExpression = UML.createStringExpression();
assertValid(stringExpression);
property6.setLowerValue(stringExpression);
assertSuperset(property6.getOwnedElements().contains(stringExpression));
LiteralUnlimitedNatural literalUnlimitedNatural = UML
.createLiteralUnlimitedNatural();
assertValid(literalUnlimitedNatural);
property6.setLowerValue(literalUnlimitedNatural);
assertSuperset(
property6.getOwnedElements().contains(literalUnlimitedNatural));
Property property7 = UML.createProperty();
assertValid(property7);
TimeInterval timeInterval = UML.createTimeInterval();
assertValid(timeInterval);
property7.setLowerValue(timeInterval);
assertSuperset(property7.getOwnedElements().contains(timeInterval));
TimeExpression timeExpression = UML.createTimeExpression();
assertValid(timeExpression);
property7.setLowerValue(timeExpression);
assertSuperset(property7.getOwnedElements().contains(timeExpression));
Property property8 = UML.createProperty();
assertValid(property8);
InstanceValue instanceValue = UML.createInstanceValue();
assertValid(instanceValue);
property8.setLowerValue(instanceValue);
assertSuperset(property8.getOwnedElements().contains(instanceValue));
}
public void testUpperValue() {
Property property = UML.createProperty();
assertValid(property);
LiteralBoolean literalBoolean = UML.createLiteralBoolean();
assertValid(literalBoolean);
property.setUpperValue(literalBoolean);
assertSuperset(property.getOwnedElements().contains(literalBoolean));
Interval interval = UML.createInterval();
assertValid(interval);
property.setUpperValue(interval);
assertSuperset(property.getOwnedElements().contains(interval));
Property property2 = UML.createProperty();
assertValid(property2);
OpaqueExpression opaqueExpression = UML.createOpaqueExpression();
assertValid(opaqueExpression);
property2.setUpperValue(opaqueExpression);
assertSuperset(property2.getOwnedElements().contains(opaqueExpression));
Expression expression = UML.createExpression();
assertValid(expression);
property2.setUpperValue(expression);
assertSuperset(property2.getOwnedElements().contains(expression));
Property property3 = UML.createProperty();
assertValid(property3);
LiteralReal literalReal = UML.createLiteralReal();
assertValid(literalReal);
property3.setUpperValue(literalReal);
assertSuperset(property3.getOwnedElements().contains(literalReal));
LiteralString literalString = UML.createLiteralString();
assertValid(literalString);
property3.setUpperValue(literalString);
assertSuperset(property3.getOwnedElements().contains(literalString));
Property property4 = UML.createProperty();
assertValid(property4);
LiteralNull literalNull = UML.createLiteralNull();
assertValid(literalNull);
property4.setUpperValue(literalNull);
assertSuperset(property4.getOwnedElements().contains(literalNull));
Duration duration = UML.createDuration();
assertValid(duration);
property4.setUpperValue(duration);
assertSuperset(property4.getOwnedElements().contains(duration));
Property property5 = UML.createProperty();
assertValid(property5);
LiteralInteger literalInteger = UML.createLiteralInteger();
assertValid(literalInteger);
property5.setUpperValue(literalInteger);
assertSuperset(property5.getOwnedElements().contains(literalInteger));
DurationInterval durationInterval = UML.createDurationInterval();
assertValid(durationInterval);
property5.setUpperValue(durationInterval);
assertSuperset(property5.getOwnedElements().contains(durationInterval));
Property property6 = UML.createProperty();
assertValid(property6);
StringExpression stringExpression = UML.createStringExpression();
assertValid(stringExpression);
property6.setUpperValue(stringExpression);
assertSuperset(property6.getOwnedElements().contains(stringExpression));
LiteralUnlimitedNatural literalUnlimitedNatural = UML
.createLiteralUnlimitedNatural();
assertValid(literalUnlimitedNatural);
property6.setUpperValue(literalUnlimitedNatural);
assertSuperset(
property6.getOwnedElements().contains(literalUnlimitedNatural));
Property property7 = UML.createProperty();
assertValid(property7);
TimeInterval timeInterval = UML.createTimeInterval();
assertValid(timeInterval);
property7.setUpperValue(timeInterval);
assertSuperset(property7.getOwnedElements().contains(timeInterval));
TimeExpression timeExpression = UML.createTimeExpression();
assertValid(timeExpression);
property7.setUpperValue(timeExpression);
assertSuperset(property7.getOwnedElements().contains(timeExpression));
Property property8 = UML.createProperty();
assertValid(property8);
InstanceValue instanceValue = UML.createInstanceValue();
assertValid(instanceValue);
property8.setUpperValue(instanceValue);
assertSuperset(property8.getOwnedElements().contains(instanceValue));
}
public void testOwningTemplateParameter() {
Property property = UML.createProperty();
assertValid(property);
ConnectableElementTemplateParameter connectableElementTemplateParameter = UML
.createConnectableElementTemplateParameter();
assertValid(connectableElementTemplateParameter);
property
.setOwningTemplateParameter(connectableElementTemplateParameter);
assertSuperset(
property.getOwner() == connectableElementTemplateParameter);
assertSuperset(property
.getTemplateParameter() == connectableElementTemplateParameter);
}
public void testTemplateParameter() {
Property property = UML.createProperty();
assertValid(property);
ConnectableElementTemplateParameter connectableElementTemplateParameter = UML
.createConnectableElementTemplateParameter();
assertValid(connectableElementTemplateParameter);
property.setTemplateParameter(connectableElementTemplateParameter);
}
public void testDeployedElement() {
Property property = UML.createProperty();
assertValid(property);
EList<PackageableElement> packageableElements = property
.getDeployedElements();
EList<PackageableElement> packageableElements2 = property
.getDeployedElements();
assertSame(packageableElements, packageableElements2);
}
public void testDeployment() {
Property property = UML.createProperty();
assertValid(property);
Deployment deployment = UML.createDeployment();
assertValid(deployment);
property.getDeployments().add(deployment);
assertSuperset(property.getOwnedElements().contains(deployment));
assertSuperset(property.getClientDependencies().contains(deployment));
}
public void testDatatype() {
Property property = UML.createProperty();
assertValid(property);
Enumeration enumeration = UML.createEnumeration();
assertValid(enumeration);
property.setDatatype(enumeration);
assertSuperset(property.getNamespace() == enumeration);
assertSuperset(
property.getFeaturingClassifiers().contains(enumeration));
assertSuperset(
property.getRedefinitionContexts().contains(enumeration));
PrimitiveType primitiveType = UML.createPrimitiveType();
assertValid(primitiveType);
property.setDatatype(primitiveType);
assertSuperset(property.getNamespace() == primitiveType);
assertSuperset(
property.getFeaturingClassifiers().contains(primitiveType));
assertSuperset(
property.getRedefinitionContexts().contains(primitiveType));
Property property2 = UML.createProperty();
assertValid(property2);
DataType dataType = UML.createDataType();
assertValid(dataType);
property2.setDatatype(dataType);
assertSuperset(property2.getNamespace() == dataType);
assertSuperset(property2.getFeaturingClassifiers().contains(dataType));
assertSuperset(property2.getRedefinitionContexts().contains(dataType));
}
public void testInterface() {
Property property = UML.createProperty();
assertValid(property);
Interface interface_ = UML.createInterface();
assertValid(interface_);
property.setInterface(interface_);
assertSuperset(property.getNamespace() == interface_);
assertSuperset(property.getFeaturingClassifiers().contains(interface_));
assertSuperset(property.getRedefinitionContexts().contains(interface_));
}
public void testAssociationEnd() {
Property property = UML.createProperty();
assertValid(property);
Port port = UML.createPort();
assertValid(port);
property.setAssociationEnd(port);
assertSuperset(property.getOwner() == port);
ExtensionEnd extensionEnd = UML.createExtensionEnd();
assertValid(extensionEnd);
property.setAssociationEnd(extensionEnd);
assertSuperset(property.getOwner() == extensionEnd);
Property property2 = UML.createProperty();
assertValid(property2);
Property property3 = UML.createProperty();
assertValid(property3);
property2.setAssociationEnd(property3);
assertSuperset(property2.getOwner() == property3);
}
public void testQualifier() {
Property property = UML.createProperty();
assertValid(property);
Port port = UML.createPort();
assertValid(port);
property.getQualifiers().add(port);
assertSuperset(property.getOwnedElements().contains(port));
ExtensionEnd extensionEnd = UML.createExtensionEnd();
assertValid(extensionEnd);
property.getQualifiers().add(extensionEnd);
assertSuperset(property.getOwnedElements().contains(extensionEnd));
Property property2 = UML.createProperty();
assertValid(property2);
property.getQualifiers().add(property2);
assertSuperset(property.getOwnedElements().contains(property2));
}
public void testDefaultValue() {
Property property = UML.createProperty();
assertValid(property);
LiteralBoolean literalBoolean = UML.createLiteralBoolean();
assertValid(literalBoolean);
property.setDefaultValue(literalBoolean);
assertSuperset(property.getOwnedElements().contains(literalBoolean));
Interval interval = UML.createInterval();
assertValid(interval);
property.setDefaultValue(interval);
assertSuperset(property.getOwnedElements().contains(interval));
Property property2 = UML.createProperty();
assertValid(property2);
OpaqueExpression opaqueExpression = UML.createOpaqueExpression();
assertValid(opaqueExpression);
property2.setDefaultValue(opaqueExpression);
assertSuperset(property2.getOwnedElements().contains(opaqueExpression));
Expression expression = UML.createExpression();
assertValid(expression);
property2.setDefaultValue(expression);
assertSuperset(property2.getOwnedElements().contains(expression));
Property property3 = UML.createProperty();
assertValid(property3);
LiteralReal literalReal = UML.createLiteralReal();
assertValid(literalReal);
property3.setDefaultValue(literalReal);
assertSuperset(property3.getOwnedElements().contains(literalReal));
LiteralString literalString = UML.createLiteralString();
assertValid(literalString);
property3.setDefaultValue(literalString);
assertSuperset(property3.getOwnedElements().contains(literalString));
Property property4 = UML.createProperty();
assertValid(property4);
LiteralNull literalNull = UML.createLiteralNull();
assertValid(literalNull);
property4.setDefaultValue(literalNull);
assertSuperset(property4.getOwnedElements().contains(literalNull));
Duration duration = UML.createDuration();
assertValid(duration);
property4.setDefaultValue(duration);
assertSuperset(property4.getOwnedElements().contains(duration));
Property property5 = UML.createProperty();
assertValid(property5);
LiteralInteger literalInteger = UML.createLiteralInteger();
assertValid(literalInteger);
property5.setDefaultValue(literalInteger);
assertSuperset(property5.getOwnedElements().contains(literalInteger));
DurationInterval durationInterval = UML.createDurationInterval();
assertValid(durationInterval);
property5.setDefaultValue(durationInterval);
assertSuperset(property5.getOwnedElements().contains(durationInterval));
Property property6 = UML.createProperty();
assertValid(property6);
StringExpression stringExpression = UML.createStringExpression();
assertValid(stringExpression);
property6.setDefaultValue(stringExpression);
assertSuperset(property6.getOwnedElements().contains(stringExpression));
LiteralUnlimitedNatural literalUnlimitedNatural = UML
.createLiteralUnlimitedNatural();
assertValid(literalUnlimitedNatural);
property6.setDefaultValue(literalUnlimitedNatural);
assertSuperset(
property6.getOwnedElements().contains(literalUnlimitedNatural));
Property property7 = UML.createProperty();
assertValid(property7);
TimeInterval timeInterval = UML.createTimeInterval();
assertValid(timeInterval);
property7.setDefaultValue(timeInterval);
assertSuperset(property7.getOwnedElements().contains(timeInterval));
TimeExpression timeExpression = UML.createTimeExpression();
assertValid(timeExpression);
property7.setDefaultValue(timeExpression);
assertSuperset(property7.getOwnedElements().contains(timeExpression));
Property property8 = UML.createProperty();
assertValid(property8);
InstanceValue instanceValue = UML.createInstanceValue();
assertValid(instanceValue);
property8.setDefaultValue(instanceValue);
assertSuperset(property8.getOwnedElements().contains(instanceValue));
}
public void testOwningAssociation() {
Property property = UML.createProperty();
assertValid(property);
AssociationClass associationClass = UML.createAssociationClass();
assertValid(associationClass);
property.setOwningAssociation(associationClass);
assertSuperset(
property.getFeaturingClassifiers().contains(associationClass));
assertSuperset(property.getNamespace() == associationClass);
assertSuperset(property.getAssociation() == associationClass);
assertSuperset(
property.getRedefinitionContexts().contains(associationClass));
CommunicationPath communicationPath = UML.createCommunicationPath();
assertValid(communicationPath);
property.setOwningAssociation(communicationPath);
assertSuperset(
property.getFeaturingClassifiers().contains(communicationPath));
assertSuperset(property.getNamespace() == communicationPath);
assertSuperset(property.getAssociation() == communicationPath);
assertSuperset(
property.getRedefinitionContexts().contains(communicationPath));
Property property2 = UML.createProperty();
assertValid(property2);
Association association = UML.createAssociation();
assertValid(association);
property2.setOwningAssociation(association);
assertSuperset(
property2.getFeaturingClassifiers().contains(association));
assertSuperset(property2.getNamespace() == association);
assertSuperset(property2.getAssociation() == association);
assertSuperset(
property2.getRedefinitionContexts().contains(association));
}
public void testRedefinedProperty() {
Property property = UML.createProperty();
assertValid(property);
Port port = UML.createPort();
assertValid(port);
property.getRedefinedProperties().add(port);
assertSuperset(property.getRedefinedElements().contains(port));
ExtensionEnd extensionEnd = UML.createExtensionEnd();
assertValid(extensionEnd);
property.getRedefinedProperties().add(extensionEnd);
assertSuperset(property.getRedefinedElements().contains(extensionEnd));
Property property2 = UML.createProperty();
assertValid(property2);
property.getRedefinedProperties().add(property2);
assertSuperset(property.getRedefinedElements().contains(property2));
}
public void testSubsettedProperty() {
Property property = UML.createProperty();
assertValid(property);
Port port = UML.createPort();
assertValid(port);
property.getSubsettedProperties().add(port);
ExtensionEnd extensionEnd = UML.createExtensionEnd();
assertValid(extensionEnd);
property.getSubsettedProperties().add(extensionEnd);
Property property2 = UML.createProperty();
assertValid(property2);
property.getSubsettedProperties().add(property2);
}
public void testAssociation() {
Property property = UML.createProperty();
assertValid(property);
Extension extension = UML.createExtension();
assertValid(extension);
property.setAssociation(extension);
AssociationClass associationClass = UML.createAssociationClass();
assertValid(associationClass);
property.setAssociation(associationClass);
Property property2 = UML.createProperty();
assertValid(property2);
CommunicationPath communicationPath = UML.createCommunicationPath();
assertValid(communicationPath);
property2.setAssociation(communicationPath);
Association association = UML.createAssociation();
assertValid(association);
property2.setAssociation(association);
}
}