blob: 5e36c1a87acc026098fc9ab713c4cbb8004a5b22 [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: TransitionImplTest.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.TransitionImpl;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Transition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are tested:
* <ul>
* <li>{@link org.eclipse.uml2.impl.TransitionImpl#getGuard() <em>Guard</em>}</li>
* </ul>
* </p>
* <p>
* The following operations are tested:
* <ul>
* <li>{@link org.eclipse.uml2.impl.TransitionImpl#getRedefinitionContexts() <em>Get Redefinition Contexts</em>}</li>
* <li>{@link org.eclipse.uml2.impl.TransitionImpl#getRedefinedElements() <em>Get Redefined Elements</em>}</li>
* <li>{@link org.eclipse.uml2.impl.TransitionImpl#getOwner() <em>Get Owner</em>}</li>
* <li>{@link org.eclipse.uml2.impl.TransitionImpl#getOwnedElements() <em>Get Owned Elements</em>}</li>
* </ul>
* </p>
* @generated
*/
public class TransitionImplTest extends RedefinableElementImplTest {
/**
* <!-- 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(TransitionImplTest.class);
}
/**
* Constructs a new Transition test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TransitionImplTest(String name) {
super(name);
}
/**
* Returns the fixture for this Transition test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private TransitionImpl getFixture() {
return (TransitionImpl) fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
protected void setUp() throws Exception {
setFixture((TransitionImpl) UML2Factory.eINSTANCE.createTransition());
}
/**
* <!-- 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.TransitionImpl#getGuard() <em>Guard</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#getGuard()
* @generated
*/
public void testGetGuard() {
// TODO: implement this feature getter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.TransitionImpl#setGuard() <em>Guard</em>}' feature setter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#setGuard()
* @generated
*/
public void testSetGuard() {
// TODO: implement this feature setter test method
}
/**
* Tests the '{@link org.eclipse.uml2.impl.TransitionImpl#getRedefinitionContexts() <em>Get Redefinition Contexts</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#getRedefinitionContexts()
* @generated
*/
public void testGetRedefinitionContextsGen() {
// TODO: implement this getter operation test method
}
public void testGetRedefinitionContexts() {
testGetRedefinitionContextsGen();
assertTrue(getFixture().getRedefinitionContexts().isEmpty());
}
/**
* Tests the '{@link org.eclipse.uml2.impl.TransitionImpl#getOwner() <em>Get Owner</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#getOwner()
* @generated
*/
public void testGetOwnerGen() {
// TODO: implement this getter operation test method
}
public void testGetOwner() {
testGetOwnerGen();
super.testGetOwner();
assertSame(getFixture().getContainer(), getFixture().getOwner());
}
/**
* Tests the '{@link org.eclipse.uml2.impl.TransitionImpl#getRedefinedElements() <em>Get Redefined Elements</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#getRedefinedElements()
* @generated
*/
public void testGetRedefinedElementsGen() {
// TODO: implement this getter operation test method
}
public void testGetRedefinedElements() {
testGetRedefinedElementsGen();
assertTrue(getFixture().getRedefinedElements().isEmpty());
}
/**
* Tests the '{@link org.eclipse.uml2.impl.TransitionImpl#getOwnedElements() <em>Get Owned Elements</em>}' getter operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.uml2.impl.TransitionImpl#getOwnedElements()
* @generated
*/
public void testGetOwnedElementsGen() {
// TODO: implement this getter operation test method
}
public void testGetOwnedElements() {
testGetOwnedElementsGen();
super.testGetOwnedElements();
assertTrue(getFixture().getOwnedElements().contains(getFixture().getEffect()));
assertTrue(getFixture().getOwnedElements().contains(getFixture().getGuard()));
}
/* (non-Javadoc)
* @see org.eclipse.uml2.impl.tests.NamedElementImplTest#setUpNamespace()
*/
protected void setUpNamespace() {
// TODO implement setUpNamespace
}
/* (non-Javadoc)
* @see org.eclipse.uml2.impl.tests.ElementImplTest#setUpOwner()
*/
protected void setUpOwner() {
UML2Factory.eINSTANCE.createRegion().getTransitions().add(getFixture());
}
/* (non-Javadoc)
* @see org.eclipse.uml2.impl.tests.ElementImplTest#setUpOwnedElements()
*/
protected void setUpOwnedElements() {
super.setUpOwnedElements();
getFixture().setEffect(UML2Factory.eINSTANCE.createActivity());
getFixture().setGuard(UML2Factory.eINSTANCE.createConstraint());
}
} //TransitionImplTest