blob: 74e59807927e37078677c4c2f8713c93bd24d472 [file] [log] [blame]
/*
* Copyright (c) 2003, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
*
* $Id: VariableImplTest.java,v 1.2 2004/05/20 03:03:32 khussey Exp $
*/
package org.eclipse.uml2.impl.tests;
import junit.textui.TestRunner;
import org.eclipse.uml2.UML2Factory;
import org.eclipse.uml2.impl.VariableImpl;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Variable</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are tested:
* <ul>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#getType() <em>Type</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#isOrdered() <em>Is Ordered</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#isUnique() <em>Is Unique</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#getLower() <em>Lower</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#getUpper() <em>Upper</em>}</li>
* </ul>
* </p>
* <p>
* The following operations are tested:
* <ul>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#lowerBound() <em>Lower Bound</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#upperBound() <em>Upper Bound</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#isMultivalued() <em>Is Multivalued</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#includesCardinality(Integer) <em>Includes Cardinality</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#includesMultiplicity(MultiplicityElement) <em>Includes Multiplicity</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#validateUpperGt0(EDiagnosticChain, EMap) <em>Validate Upper Gt0</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#validateLowerGe0(EDiagnosticChain, EMap) <em>Validate Lower Ge0</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#validateUpperGeLower(EDiagnosticChain, EMap) <em>Validate Upper Ge Lower</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#validateLowerEqLowerbound(EDiagnosticChain, EMap) <em>Validate Lower Eq Lowerbound</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#validateUpperEqUpperbound(EDiagnosticChain, EMap) <em>Validate Upper Eq Upperbound</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#lower() <em>Lower</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#upper() <em>Upper</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#getOwnedElements() <em>Get Owned Elements</em>}</li>
* <li>{@link org.eclipse.uml2.impl.VariableImpl#getOwner() <em>Get Owner</em>}</li>
* </ul>
* </p>
* @generated
*/
public class VariableImplTest extends ConnectableElementImplTest {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright (c) 2003, 2004 IBM Corporation and others."; //$NON-NLS-1$
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static void main(String[] args) {
TestRunner.run(VariableImplTest.class);
}
/**
* Constructs a new Variable test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public VariableImplTest(String name) {
super(name);
}
/**
* Returns the fixture for this Variable test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private VariableImpl getFixture() {
return (VariableImpl) fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
protected void setUp() throws Exception {
setFixture((VariableImpl) UML2Factory.eINSTANCE.createVariable());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#tearDown()
* @generated
*/
protected void tearDown() throws Exception {
setFixture(null);
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#getType() <em>Type</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#getType()
* @generated
*/
public void testGetType() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#setType() <em>Type</em>}' feature setter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#setType()
* @generated
*/
public void testSetType() {
// TODO: implement this feature setter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#isOrdered() <em>Is Ordered</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#isOrdered()
* @generated
*/
public void testIsOrdered() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#setIsOrdered() <em>Is Ordered</em>}' feature setter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#setIsOrdered()
* @generated
*/
public void testSetIsOrdered() {
// TODO: implement this feature setter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#isUnique() <em>Is Unique</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#isUnique()
* @generated
*/
public void testIsUnique() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#setIsUnique() <em>Is Unique</em>}' feature setter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#setIsUnique()
* @generated
*/
public void testSetIsUnique() {
// TODO: implement this feature setter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#getLower() <em>Lower</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#getLower()
* @generated
*/
public void testGetLower() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#getUpper() <em>Upper</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#getUpper()
* @generated
*/
public void testGetUpper() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#lowerBound() <em>Lower Bound</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#lowerBound()
* @generated
*/
public void testLowerBound() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#upperBound() <em>Upper Bound</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#upperBound()
* @generated
*/
public void testUpperBound() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#isMultivalued() <em>Is Multivalued</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#isMultivalued()
* @generated
*/
public void testIsMultivalued() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#includesCardinality(Integer) <em>Includes Cardinality</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#includesCardinality(Integer)
* @generated
*/
public void testIncludesCardinality__Integer() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#includesMultiplicity(MultiplicityElement) <em>Includes Multiplicity</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#includesMultiplicity(MultiplicityElement)
* @generated
*/
public void testIncludesMultiplicity__MultiplicityElement() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#validateUpperGt0(EDiagnosticChain, EMap) <em>Validate Upper Gt0</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#validateUpperGt0(EDiagnosticChain, EMap)
* @generated
*/
public void testValidateUpperGt0__EDiagnosticChain_EMap() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#validateLowerGe0(EDiagnosticChain, EMap) <em>Validate Lower Ge0</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#validateLowerGe0(EDiagnosticChain, EMap)
* @generated
*/
public void testValidateLowerGe0__EDiagnosticChain_EMap() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#validateUpperGeLower(EDiagnosticChain, EMap) <em>Validate Upper Ge Lower</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#validateUpperGeLower(EDiagnosticChain, EMap)
* @generated
*/
public void testValidateUpperGeLower__EDiagnosticChain_EMap() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#validateLowerEqLowerbound(EDiagnosticChain, EMap) <em>Validate Lower Eq Lowerbound</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#validateLowerEqLowerbound(EDiagnosticChain, EMap)
* @generated
*/
public void testValidateLowerEqLowerbound__EDiagnosticChain_EMap() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#validateUpperEqUpperbound(EDiagnosticChain, EMap) <em>Validate Upper Eq Upperbound</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#validateUpperEqUpperbound(EDiagnosticChain, EMap)
* @generated
*/
public void testValidateUpperEqUpperbound__EDiagnosticChain_EMap() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#lower() <em>Lower</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#lower()
* @generated
*/
public void testLower() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#upper() <em>Upper</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#upper()
* @generated
*/
public void testUpper() {
// TODO: implement this operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#getOwnedElements() <em>Get Owned Elements</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#getOwnedElements()
* @generated
*/
public void testGetOwnedElements() {
// TODO: implement this getter operation test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.VariableImpl#getOwner() <em>Get Owner</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.VariableImpl#getOwner()
* @generated
*/
public void testGetOwnerGen() {
// TODO: implement this getter operation test method
}
public void testGetOwner() {
testGetOwnerGen();
super.testGetOwner();
assertSame(getFixture().getScope(), getFixture().getOwner());
}
/* (non-Javadoc)
* @see org.eclipse.uml2.impl.tests.NamedElementImplTest#setUpNamespace()
*/
protected void setUpNamespace() {
UML2Factory.eINSTANCE.createStructuredActivityNode().getVariables().add(getFixture());
}
/* (non-Javadoc)
* @see org.eclipse.uml2.impl.tests.ElementImplTest#setUpOwner()
*/
protected void setUpOwner() {
UML2Factory.eINSTANCE.createStructuredActivityNode().getVariables().add(getFixture());
}
} //VariableImplTest