org.eclipse.emf.test.edit.command
Class UnsetCommandTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eclipse.emf.test.edit.command.UnsetCommandTest
All Implemented Interfaces:
junit.framework.Test

public class UnsetCommandTest
extends junit.framework.TestCase

Tests for unsetting use of SetCommand. In each case, the model is built, the command is created, executed, undone, and redone. The state of the model and the executability/undoability/redoability of the command are tested between each step.


Field Summary
protected  EditingDomain editingDomain
          An editing domain for for these tests.
protected  RefFactory refFactory
          The Ref factory.
protected  RefPackage refPackage
          The Ref test package, which includes all the various combinations of bidirectionality, multiplicity, and containment in references.
protected  URefFactory uRefFactory
          The URefFactory.
protected  URefPackage uRefPackage
          Another version of the Ref test package, where all the features are unsettable.
 
Constructor Summary
UnsetCommandTest(java.lang.String name)
           
 
Method Summary
protected  void assertFeatureSet(EObject owner, EStructuralFeature feature, java.lang.Object value)
           
protected  void assertFeatureSet(EObject owner, EStructuralFeature feature, java.lang.Object[] values)
           
protected  void assertFeatureUnset(EObject owner, EStructuralFeature feature)
           
protected  void assertOppositeSet(EObject owner, EStructuralFeature feature, java.lang.Object value)
           
protected  void setUp()
           
static junit.framework.Test suite()
           
 void testAttribute1()
           
 void testAttributeMany()
           
 void testContainment1()
           
 void testContainmentMany()
           
 void testEmptyAttributeMany()
           
 void testEmptyContainmentMany()
           
 void testEmptyUnsettableAttributeMany()
           
 void testEmptyUnsettableContainmentMany()
           
 void testInUnsettableMany()
           
 void testNullAttribute1()
           
 void testNullContainment1()
           
 void testNullReference1ToMany()
           
 void testNullUnsettableAttribute1()
           
 void testNullUnsettableContainment1()
           
 void testNullUnsettableReference1ToMany()
           
 void testReference1ToMany()
           
 void testUnsettableAttribute1()
           
 void testUnsettableAttributeMany()
           
 void testUnsettableContainment1()
           
 void testUnsettableContainmentMany()
           
 void testUnsettableReference1ToMany()
           
 void testUnsetUnsettableAttribute1()
           
 void testUnsetUnsettableAttributeMany()
           
 void testUnsetUnsettableContainment1()
           
 void testUnsetUnsettableContainmentMany()
           
 void testUnsetUnsettableReference1ToMany()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

refPackage

protected RefPackage refPackage
The Ref test package, which includes all the various combinations of bidirectionality, multiplicity, and containment in references.


refFactory

protected RefFactory refFactory
The Ref factory.


uRefPackage

protected URefPackage uRefPackage
Another version of the Ref test package, where all the features are unsettable.


uRefFactory

protected URefFactory uRefFactory
The URefFactory.


editingDomain

protected EditingDomain editingDomain
An editing domain for for these tests.

Constructor Detail

UnsetCommandTest

public UnsetCommandTest(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testAttribute1

public void testAttribute1()

testNullAttribute1

public void testNullAttribute1()

testAttributeMany

public void testAttributeMany()

testEmptyAttributeMany

public void testEmptyAttributeMany()

testUnsettableAttribute1

public void testUnsettableAttribute1()

testUnsetUnsettableAttribute1

public void testUnsetUnsettableAttribute1()

testNullUnsettableAttribute1

public void testNullUnsettableAttribute1()

testUnsettableAttributeMany

public void testUnsettableAttributeMany()

testUnsetUnsettableAttributeMany

public void testUnsetUnsettableAttributeMany()

testEmptyUnsettableAttributeMany

public void testEmptyUnsettableAttributeMany()

testContainment1

public void testContainment1()

testNullContainment1

public void testNullContainment1()

testContainmentMany

public void testContainmentMany()

testEmptyContainmentMany

public void testEmptyContainmentMany()

testUnsettableContainment1

public void testUnsettableContainment1()

testUnsetUnsettableContainment1

public void testUnsetUnsettableContainment1()

testNullUnsettableContainment1

public void testNullUnsettableContainment1()

testUnsettableContainmentMany

public void testUnsettableContainmentMany()

testEmptyUnsettableContainmentMany

public void testEmptyUnsettableContainmentMany()

testUnsetUnsettableContainmentMany

public void testUnsetUnsettableContainmentMany()

testReference1ToMany

public void testReference1ToMany()

testNullReference1ToMany

public void testNullReference1ToMany()

testUnsettableReference1ToMany

public void testUnsettableReference1ToMany()

testUnsetUnsettableReference1ToMany

public void testUnsetUnsettableReference1ToMany()

testNullUnsettableReference1ToMany

public void testNullUnsettableReference1ToMany()

testInUnsettableMany

public void testInUnsettableMany()

assertFeatureUnset

protected void assertFeatureUnset(EObject owner,
                                  EStructuralFeature feature)

assertFeatureSet

protected void assertFeatureSet(EObject owner,
                                EStructuralFeature feature,
                                java.lang.Object value)

assertFeatureSet

protected void assertFeatureSet(EObject owner,
                                EStructuralFeature feature,
                                java.lang.Object[] values)

assertOppositeSet

protected void assertOppositeSet(EObject owner,
                                 EStructuralFeature feature,
                                 java.lang.Object value)

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.