org.jhotdraw.test.contrib
Class CommandMenuItemTest

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

public class CommandMenuItemTest
extends JHDTestCase

TestCase CommandMenuItemTest is generated by JUnitDoclet to hold the tests for CommandMenuItem.

See Also:
CommandMenuItem

Field Summary
 
Fields inherited from class org.jhotdraw.test.JHDTestCase
myDrawingEditor
 
Constructor Summary
CommandMenuItemTest(java.lang.String name)
          Constructor CommandMenuItemTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.
 
Method Summary
 CommandMenuItem createInstance()
          Factory method for instances of the class to be tested.
 void testActionPerformed()
          Method testActionPerformed is testing actionPerformed
 void testSetGetCommand()
          Method testSetGetCommand is testing setCommand and getCommand together by setting some value and verifying it by reading.
 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

CommandMenuItemTest

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

Method Detail

createInstance

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

Throws:
java.lang.Exception

testSetGetCommand

public void testSetGetCommand()
                       throws java.lang.Exception
Method testSetGetCommand is testing setCommand and getCommand together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
CommandMenuItem.setCommand(org.jhotdraw.util.Command), CommandMenuItem.getCommand()

testActionPerformed

public void testActionPerformed()
                         throws java.lang.Exception
Method testActionPerformed is testing actionPerformed

Throws:
java.lang.Exception
See Also:
CommandMenuItem.actionPerformed(java.awt.event.ActionEvent)

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