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

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

public class SetCommandTest
extends junit.framework.TestCase

Tests for SetCommand. This exercises the cases in SetCommand.create for which different command may be returned. 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
          And 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.
 
Constructor Summary
SetCommandTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void testBiDiRemove()
          Shows that undo on remove doesn't work properly in the many-to-many case.
 void testDuplicate()
           
 void testDuplicateInAttribute()
           
 void testDuplicateInUniqueAttribute()
           
 void testManyStayEmpty()
           
 void testManyToMany()
           
 void testManyToManyNonUndoable()
           
 void testManyToManySimple()
           
 void testManyToOne()
           
 void testManyToOneSimple()
           
 void testOneToMany()
           
 void testOneToManyNull()
           
 void testOneToManySimple()
           
 void testOneToManyStayNull()
           
 void testOneToOne()
           
 void testOneToOneSimple()
           
 
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.


editingDomain

protected EditingDomain editingDomain
And editing domain for for these tests.

Constructor Detail

SetCommandTest

public SetCommandTest(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

testDuplicate

public void testDuplicate()

testDuplicateInUniqueAttribute

public void testDuplicateInUniqueAttribute()

testDuplicateInAttribute

public void testDuplicateInAttribute()

testManyToManySimple

public void testManyToManySimple()

testManyToMany

public void testManyToMany()

testManyToManyNonUndoable

public void testManyToManyNonUndoable()

testOneToManyStayNull

public void testOneToManyStayNull()

testOneToManyNull

public void testOneToManyNull()

testOneToManySimple

public void testOneToManySimple()

testOneToMany

public void testOneToMany()

testManyToOneSimple

public void testManyToOneSimple()

testManyToOne

public void testManyToOne()

testOneToOneSimple

public void testOneToOneSimple()

testOneToOne

public void testOneToOne()

testManyStayEmpty

public void testManyStayEmpty()

testBiDiRemove

public void testBiDiRemove()
Shows that undo on remove doesn't work properly in the many-to-many case. Should not be run as part of the suite.


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