org.jhotdraw.test.util
Class UndoableToolTest

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

public class UndoableToolTest
extends JHDTestCase

TestCase UndoableToolTest is generated by JUnitDoclet to hold the tests for UndoableTool.

See Also:
UndoableTool

Field Summary
 
Fields inherited from class org.jhotdraw.test.JHDTestCase
myDrawingEditor
 
Constructor Summary
UndoableToolTest(java.lang.String name)
          Constructor UndoableToolTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.
 
Method Summary
 UndoableTool createInstance()
          Factory method for instances of the class to be tested.
 void testActivate()
          Method testActivate is testing activate
 void testAddToolListener()
          Method testAddToolListener is testing addToolListener
 void testCreateEventDispatcher()
          Method testCreateEventDispatcher is testing createEventDispatcher
 void testDeactivate()
          Method testDeactivate is testing deactivate
 void testEditor()
          Method testEditor is testing editor
 void testGetActiveView()
          Method testGetActiveView is testing getActiveView
 void testIsActive()
          Method testIsActive is testing isActive
 void testKeyDown()
          Method testKeyDown is testing keyDown
 void testMouseDown()
          Method testMouseDown is testing mouseDown
 void testMouseDrag()
          Method testMouseDrag is testing mouseDrag
 void testMouseMove()
          Method testMouseMove is testing mouseMove
 void testMouseUp()
          Method testMouseUp is testing mouseUp
 void testRemoveToolListener()
          Method testRemoveToolListener is testing removeToolListener
 void testSetGetUndoActivity()
           
 void testSetIsEnabled()
          Method testSetIsEnabled is testing setEnabled and isEnabled together by setting some value and verifying it by reading.
 void testSetIsUsable()
          Method testSetIsUsable is testing setUsable and isUsable together by setting some value and verifying it by reading.
 void testToolActivated()
          Method testToolActivated is testing toolActivated
 void testToolDeactivated()
          Method testToolDeactivated is testing toolDeactivated
 void testToolDisabled()
          Method testToolDisabled is testing toolDisabled
 void testToolEnabled()
          Method testToolEnabled is testing toolEnabled
 void testToolUnusable()
          Method testToolUnusable is testing toolUnusable
 void testToolUsable()
          Method testToolUsable is testing toolUsable
 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.
 void testView()
          Method testView is testing view
 
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

UndoableToolTest

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

Method Detail

createInstance

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

Throws:
java.lang.Exception

testActivate

public void testActivate()
                  throws java.lang.Exception
Method testActivate is testing activate

Throws:
java.lang.Exception
See Also:
UndoableTool.activate()

testDeactivate

public void testDeactivate()
                    throws java.lang.Exception
Method testDeactivate is testing deactivate

Throws:
java.lang.Exception
See Also:
UndoableTool.deactivate()

testMouseDown

public void testMouseDown()
                   throws java.lang.Exception
Method testMouseDown is testing mouseDown

Throws:
java.lang.Exception
See Also:
UndoableTool.mouseDown(java.awt.event.MouseEvent, int, int)

testMouseDrag

public void testMouseDrag()
                   throws java.lang.Exception
Method testMouseDrag is testing mouseDrag

Throws:
java.lang.Exception
See Also:
UndoableTool.mouseDrag(java.awt.event.MouseEvent, int, int)

testMouseUp

public void testMouseUp()
                 throws java.lang.Exception
Method testMouseUp is testing mouseUp

Throws:
java.lang.Exception
See Also:
UndoableTool.mouseUp(java.awt.event.MouseEvent, int, int)

testMouseMove

public void testMouseMove()
                   throws java.lang.Exception
Method testMouseMove is testing mouseMove

Throws:
java.lang.Exception
See Also:
UndoableTool.mouseMove(java.awt.event.MouseEvent, int, int)

testKeyDown

public void testKeyDown()
                 throws java.lang.Exception
Method testKeyDown is testing keyDown

Throws:
java.lang.Exception
See Also:
UndoableTool.keyDown(java.awt.event.KeyEvent, int)

testIsActive

public void testIsActive()
                  throws java.lang.Exception
Method testIsActive is testing isActive

Throws:
java.lang.Exception
See Also:
UndoableTool.isActive()

testSetIsUsable

public void testSetIsUsable()
                     throws java.lang.Exception
Method testSetIsUsable is testing setUsable and isUsable together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
UndoableTool.setUsable(boolean), UndoableTool.isUsable()

testSetIsEnabled

public void testSetIsEnabled()
                      throws java.lang.Exception
Method testSetIsEnabled is testing setEnabled and isEnabled together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
UndoableTool.setEnabled(boolean), UndoableTool.isEnabled()

testEditor

public void testEditor()
                throws java.lang.Exception
Method testEditor is testing editor

Throws:
java.lang.Exception
See Also:
UndoableTool.editor()

testView

public void testView()
              throws java.lang.Exception
Method testView is testing view

Throws:
java.lang.Exception
See Also:
UndoableTool.view()

testSetGetUndoActivity

public void testSetGetUndoActivity()
                            throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
UndoableTool.setUndoActivity(org.jhotdraw.util.Undoable), UndoableTool.getUndoActivity()

testToolUsable

public void testToolUsable()
                    throws java.lang.Exception
Method testToolUsable is testing toolUsable

Throws:
java.lang.Exception
See Also:
UndoableTool.toolUsable(java.util.EventObject)

testToolUnusable

public void testToolUnusable()
                      throws java.lang.Exception
Method testToolUnusable is testing toolUnusable

Throws:
java.lang.Exception
See Also:
UndoableTool.toolUnusable(java.util.EventObject)

testToolActivated

public void testToolActivated()
                       throws java.lang.Exception
Method testToolActivated is testing toolActivated

Throws:
java.lang.Exception
See Also:
UndoableTool.toolActivated(java.util.EventObject)

testToolDeactivated

public void testToolDeactivated()
                         throws java.lang.Exception
Method testToolDeactivated is testing toolDeactivated

Throws:
java.lang.Exception
See Also:
UndoableTool.toolDeactivated(java.util.EventObject)

testToolEnabled

public void testToolEnabled()
                     throws java.lang.Exception
Method testToolEnabled is testing toolEnabled

Throws:
java.lang.Exception
See Also:
UndoableTool.toolEnabled(java.util.EventObject)

testToolDisabled

public void testToolDisabled()
                      throws java.lang.Exception
Method testToolDisabled is testing toolDisabled

Throws:
java.lang.Exception
See Also:
UndoableTool.toolDisabled(java.util.EventObject)

testAddToolListener

public void testAddToolListener()
                         throws java.lang.Exception
Method testAddToolListener is testing addToolListener

Throws:
java.lang.Exception
See Also:
UndoableTool.addToolListener(org.jhotdraw.framework.ToolListener)

testRemoveToolListener

public void testRemoveToolListener()
                            throws java.lang.Exception
Method testRemoveToolListener is testing removeToolListener

Throws:
java.lang.Exception
See Also:
UndoableTool.removeToolListener(org.jhotdraw.framework.ToolListener)

testCreateEventDispatcher

public void testCreateEventDispatcher()
                               throws java.lang.Exception
Method testCreateEventDispatcher is testing createEventDispatcher

Throws:
java.lang.Exception
See Also:
UndoableTool.createEventDispatcher()

testGetActiveView

public void testGetActiveView()
                       throws java.lang.Exception
Method testGetActiveView is testing getActiveView

Throws:
java.lang.Exception
See Also:
UndoableTool.getActiveView()

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