org.jhotdraw.test.util
Class UndoableAdapterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jhotdraw.test.JHDTestCase
              extended by org.jhotdraw.test.util.UndoableAdapterTest
All Implemented Interfaces:
junit.framework.Test

public class UndoableAdapterTest
extends JHDTestCase

TestCase UndoableAdapterTest is generated by JUnitDoclet to hold the tests for UndoableAdapter.

See Also:
UndoableAdapter

Field Summary
 
Fields inherited from class org.jhotdraw.test.JHDTestCase
myDrawingEditor
 
Constructor Summary
UndoableAdapterTest(java.lang.String name)
          Constructor UndoableAdapterTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.
 
Method Summary
 UndoableAdapter createInstance()
          Factory method for instances of the class to be tested.
 void testGetAffectedFiguresCount()
          Method testGetAffectedFiguresCount is testing getAffectedFiguresCount
 void testGetDrawingView()
          Method testGetDrawingView is testing getDrawingView
 void testRedo()
          Method testRedo is testing redo
 void testRelease()
          Method testRelease is testing release
 void testSetGetAffectedFigures()
          Method testSetGetAffectedFigures is testing setAffectedFigures and getAffectedFigures together by setting some value and verifying it by reading.
 void testSetIsRedoable()
          Method testSetIsRedoable is testing setRedoable and isRedoable together by setting some value and verifying it by reading.
 void testSetIsUndoable()
          Method testSetIsUndoable is testing setUndoable and isUndoable together by setting some value and verifying it by reading.
 void testSetNullAffectedFigures()
          Test a null argument to setAffectedFigures.
 void testUndo()
          Method testUndo is testing undo
 void testVault()
          JUnitDoclet moves marker to this method, if there is not match for them in the regenerated code and if the marker is not empty.
 
Methods inherited from class org.jhotdraw.test.JHDTestCase
createNewDrawingEditor, getDrawingEditor
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndoableAdapterTest

public UndoableAdapterTest(java.lang.String name)
Constructor UndoableAdapterTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.

Method Detail

createInstance

public UndoableAdapter createInstance()
                               throws java.lang.Exception
Factory method for instances of the class to be tested.

Throws:
java.lang.Exception

testUndo

public void testUndo()
              throws java.lang.Exception
Method testUndo is testing undo

Throws:
java.lang.Exception
See Also:
UndoableAdapter.undo()

testRedo

public void testRedo()
              throws java.lang.Exception
Method testRedo is testing redo

Throws:
java.lang.Exception
See Also:
UndoableAdapter.redo()

testSetIsUndoable

public void testSetIsUndoable()
                       throws java.lang.Exception
Method testSetIsUndoable is testing setUndoable and isUndoable together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
UndoableAdapter.setUndoable(boolean), UndoableAdapter.isUndoable()

testSetIsRedoable

public void testSetIsRedoable()
                       throws java.lang.Exception
Method testSetIsRedoable is testing setRedoable and isRedoable together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
UndoableAdapter.setRedoable(boolean), UndoableAdapter.isRedoable()

testSetGetAffectedFigures

public void testSetGetAffectedFigures()
                               throws java.lang.Exception
Method testSetGetAffectedFigures is testing setAffectedFigures and getAffectedFigures together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
UndoableAdapter.setAffectedFigures(org.jhotdraw.framework.FigureEnumeration), UndoableAdapter.getAffectedFigures()

testSetNullAffectedFigures

public void testSetNullAffectedFigures()
                                throws java.lang.Exception
Test a null argument to setAffectedFigures. Expect an IllegalArgumentException

Throws:
java.lang.Exception
See Also:
org.jhotdraw.util.UndoRedoActivity#setAffectedFigures(org.jhotdraw.framework.PointConstrainer)

testGetAffectedFiguresCount

public void testGetAffectedFiguresCount()
                                 throws java.lang.Exception
Method testGetAffectedFiguresCount is testing getAffectedFiguresCount

Throws:
java.lang.Exception
See Also:
UndoableAdapter.getAffectedFiguresCount()

testRelease

public void testRelease()
                 throws java.lang.Exception
Method testRelease is testing release

Throws:
java.lang.Exception
See Also:
UndoableAdapter.release()

testGetDrawingView

public void testGetDrawingView()
                        throws java.lang.Exception
Method testGetDrawingView is testing getDrawingView

Throws:
java.lang.Exception
See Also:
UndoableAdapter.getDrawingView()

testVault

public void testVault()
               throws java.lang.Exception
JUnitDoclet moves marker to this method, if there is not match for them in the regenerated code and if the marker is not empty. This way, no test gets lost when regenerating after renaming. Method testVault is supposed to be empty.

Throws:
java.lang.Exception