blob: d1346a61f84fb769fd269bfd037cb2430277f4a1 [file] [log] [blame]
/*
* Copyright (c) 2003, 2005 IBM Corporation 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:
* IBM - initial API and implementation
*
* $Id: RedefinableElementTest.java,v 1.2 2005/04/20 19:00:46 khussey Exp $
*/
package org.eclipse.uml2.tests;
import java.util.Iterator;
import org.eclipse.uml2.Classifier;
import org.eclipse.uml2.RedefinableElement;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Redefinable Element</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are tested:
* <ul>
* <li>{@link org.eclipse.uml2.RedefinableElement#getRedefinitionContexts() <em>Redefinition Context</em>}</li>
* </ul>
* </p>
* <p>
* The following operations are tested:
* <ul>
* <li>{@link org.eclipse.uml2.RedefinableElement#validateRedefinitionContextValid(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Redefinition Context Valid</em>}</li>
* <li>{@link org.eclipse.uml2.RedefinableElement#validateRedefinitionConsistent(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Redefinition Consistent</em>}</li>
* <li>{@link org.eclipse.uml2.RedefinableElement#isConsistentWith(org.eclipse.uml2.RedefinableElement) <em>Is Consistent With</em>}</li>
* <li>{@link org.eclipse.uml2.RedefinableElement#isRedefinitionContextValid(org.eclipse.uml2.RedefinableElement) <em>Is Redefinition Context Valid</em>}</li>
* <li>{@link org.eclipse.uml2.RedefinableElement#getRedefinedElements() <em>Get Redefined Elements</em>}</li>
* </ul>
* </p>
* @generated
*/
public abstract class RedefinableElementTest extends NamedElementTest {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright (c) 2003, 2005 IBM Corporation and others."; //$NON-NLS-1$
/**
* Constructs a new Redefinable Element test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RedefinableElementTest(String name) {
super(name);
}
/**
* Returns the fixture for this Redefinable Element test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private RedefinableElement getFixture() {
return (RedefinableElement)fixture;
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#getRedefinitionContexts() <em>Redefinition Context</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#getRedefinitionContexts()
* @generated
*/
public void testGetRedefinitionContextsGen() {
// TODO: implement this feature getter test method
// Ensure that you remove @generated or mark it @generated NOT
}
public void testGetRedefinitionContexts() {
testGetRedefinitionContextsGen();
setUpRedefinitionContexts();
for (Iterator redefinitionContexts = getFixture().getRedefinitionContexts().iterator(); redefinitionContexts.hasNext();) {
assertTrue(Classifier.class.isInstance(redefinitionContexts.next()));
}
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#validateRedefinitionContextValid(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Redefinition Context Valid</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#validateRedefinitionContextValid(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
* @generated
*/
public void testValidateRedefinitionContextValid__DiagnosticChain_Map() {
// TODO: implement this operation test method
// Ensure that you remove @generated or mark it @generated NOT
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#validateRedefinitionConsistent(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Redefinition Consistent</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#validateRedefinitionConsistent(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
* @generated
*/
public void testValidateRedefinitionConsistent__DiagnosticChain_Map() {
// TODO: implement this operation test method
// Ensure that you remove @generated or mark it @generated NOT
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#isConsistentWith(org.eclipse.uml2.RedefinableElement) <em>Is Consistent With</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#isConsistentWith(org.eclipse.uml2.RedefinableElement)
* @generated
*/
public void testIsConsistentWith__RedefinableElement() {
// TODO: implement this operation test method
// Ensure that you remove @generated or mark it @generated NOT
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#isRedefinitionContextValid(org.eclipse.uml2.RedefinableElement) <em>Is Redefinition Context Valid</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#isRedefinitionContextValid(org.eclipse.uml2.RedefinableElement)
* @generated
*/
public void testIsRedefinitionContextValid__RedefinableElement() {
// TODO: implement this operation test method
// Ensure that you remove @generated or mark it @generated NOT
}
/**
* Tests the '{@link org.eclipse.uml2.RedefinableElement#getRedefinedElements() <em>Get Redefined Elements</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.RedefinableElement#getRedefinedElements()
* @generated
*/
public void testGetRedefinedElementsGen() {
// TODO: implement this getter operation test method
// Ensure that you remove @generated or mark it @generated NOT
}
public void testGetRedefinedElements() {
testGetRedefinedElementsGen();
setUpRedefinedElements();
for (Iterator redefinedElements = getFixture().getRedefinedElements().iterator(); redefinedElements.hasNext();) {
assertTrue(RedefinableElement.class.isInstance(redefinedElements.next()));
}
}
protected void setUpRedefinitionContexts() {
// do nothing
}
protected void setUpRedefinedElements() {
// do nothing
}
} //RedefinableElementImplTest