org.jhotdraw.test.util
Class UndoRedoActivityTest

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.UndoRedoActivityTest
All Implemented Interfaces:
junit.framework.Test

public class UndoRedoActivityTest
extends JHDTestCase

TestCase UndoRedoActivityTest is generated by JUnitDoclet to hold the tests for UndoRedoActivity.

See Also:
UndoRedoActivity

Field Summary
 
Fields inherited from class org.jhotdraw.test.JHDTestCase
myDrawingEditor
 
Constructor Summary
UndoRedoActivityTest(java.lang.String name)
          Constructor UndoRedoActivityTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.
 
Method Summary
 UndoRedoActivity createInstance()
          Factory method for instances of the class to be tested.
 void testCreateUndoRedoActivity()
          Method testCreateUndoRedoActivity is testing createUndoRedoActivity
 void testGetAffectedFiguresCount()
          Method testGetAffectedFiguresCount is testing getAffectedFiguresCount
 void testGetDrawingView()
          Method testGetDrawingView is testing getDrawingView
 void testGetReversedActivity()
          Method testGetReversedActivity is testing getReversedActivity
 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

UndoRedoActivityTest

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

Method Detail

createInstance

public UndoRedoActivity 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:
UndoRedoActivity.undo()

testRedo

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

Throws:
java.lang.Exception
See Also:
UndoRedoActivity.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:
UndoRedoActivity.setUndoable(boolean), UndoRedoActivity.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:
UndoRedoActivity.setRedoable(boolean), UndoRedoActivity.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:
UndoRedoActivity.setAffectedFigures(org.jhotdraw.framework.FigureEnumeration), UndoRedoActivity.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:
UndoRedoActivity.getAffectedFiguresCount()

testGetDrawingView

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

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

testRelease

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

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

testGetReversedActivity

public void testGetReversedActivity()
                             throws java.lang.Exception
Method testGetReversedActivity is testing getReversedActivity

Throws:
java.lang.Exception
See Also:
UndoRedoActivity.getReversedActivity()

testCreateUndoRedoActivity

public void testCreateUndoRedoActivity()
                                throws java.lang.Exception
Method testCreateUndoRedoActivity is testing createUndoRedoActivity

Throws:
java.lang.Exception
See Also:
UndoRedoActivity.createUndoRedoActivity(org.jhotdraw.util.Undoable)

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