org.jhotdraw.test.standard
Class StandardDrawingViewTest

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

public class StandardDrawingViewTest
extends JHDTestCase

TestCase StandardDrawingViewTest is generated by JUnitDoclet to hold the tests for StandardDrawingView.

See Also:
StandardDrawingView

Field Summary
 
Fields inherited from class org.jhotdraw.test.JHDTestCase
myDrawingEditor
 
Constructor Summary
StandardDrawingViewTest(java.lang.String name)
          Constructor StandardDrawingViewTest is basically calling the inherited constructor to initiate the TestCase for use by the Framework.
 
Method Summary
 StandardDrawingView createInstance()
          Factory method for instances of the class to be tested.
 void testAdd()
          Method testAdd is testing add
 void testAddAll()
          Method testAddAll is testing addAll
 void testAddBackground()
          Method testAddBackground is testing addBackground
 void testAddFigureSelectionListener()
          Method testAddFigureSelectionListener is testing addFigureSelectionListener
 void testAddForeground()
          Method testAddForeground is testing addForeground
 void testAddToSelection()
          Method testAddToSelection is testing addToSelection
 void testAddToSelectionAll()
          Method testAddToSelectionAll is testing addToSelectionAll
 void testAutoscroll()
          Method testAutoscroll is testing autoscroll
 void testCheckDamage()
          Method testCheckDamage is testing checkDamage
 void testClearSelection()
          Method testClearSelection is testing clearSelection
 void testDraw()
          Method testDraw is testing draw
 void testDrawAll()
          Method testDrawAll is testing drawAll
 void testDrawBackground()
          Method testDrawBackground is testing drawBackground
 void testDrawDrawing()
          Method testDrawDrawing is testing drawDrawing
 void testDrawHandles()
          Method testDrawHandles is testing drawHandles
 void testDrawing()
          Method testDrawing is testing drawing
 void testDrawingInvalidated()
          Method testDrawingInvalidated is testing drawingInvalidated
 void testDrawingRequestUpdate()
          Method testDrawingRequestUpdate is testing drawingRequestUpdate
 void testDrawingTitleChanged()
          Method testDrawingTitleChanged is testing drawingTitleChanged
 void testEditor()
          Method testEditor is testing editor
 void testFigureExists()
          Method testFigureExists is testing figureExists
 void testFindHandle()
          Method testFindHandle is testing findHandle
 void testFreezeView()
          Method testFreezeView is testing freezeView
 void testGetAutoscrollInsets()
          Method testGetAutoscrollInsets is testing getAutoscrollInsets
 void testGetConnectionFigures()
          Method testGetConnectionFigures is testing getConnectionFigures
 void testGetDefaultDNDActions()
          Method testGetDefaultDNDActions is testing getDefaultDNDActions
 void testGetFigureSelection()
          Method testGetFigureSelection is testing getFigureSelection
 void testGetMinimumSize()
          Method testGetMinimumSize is testing getMinimumSize
 void testGetPreferredSize()
          Method testGetPreferredSize is testing getPreferredSize
 void testInsertFigures()
          Method testInsertFigures is testing insertFigures
 void testIsFigureSelected()
          Method testIsFigureSelected is testing isFigureSelected
 void testIsFocusTraversable()
          Method testIsFocusTraversable is testing isFocusTraversable
 void testIsInteractive()
          Method testIsInteractive is testing isInteractive
 void testKeyReleased()
          Method testKeyReleased is testing keyReleased
 void testKeyTyped()
          Method testKeyTyped is testing keyTyped
 void testLastClick()
          Method testLastClick is testing lastClick
 void testRemove()
          Method testRemove is testing remove
 void testRemoveBackground()
          Method testRemoveBackground is testing removeBackground
 void testRemoveFigureSelectionListener()
          Method testRemoveFigureSelectionListener is testing removeFigureSelectionListener
 void testRemoveForeground()
          Method testRemoveForeground is testing removeForeground
 void testRemoveFromSelection()
          Method testRemoveFromSelection is testing removeFromSelection
 void testRepairDamage()
          Method testRepairDamage is testing repairDamage
 void testSelection()
          Method testSelection is testing selection
 void testSelectionCount()
          Method testSelectionCount is testing selectionCount
 void testSelectionZOrdered()
          Method testSelectionZOrdered is testing selectionZOrdered
 void testSetDragSourceActive()
          Method testSetDragSourceActive is testing setDragSourceActive
 void testSetDrawing()
          Method testSetDrawing is testing setDrawing
 void testSetDropTargetActive()
          Method testSetDropTargetActive is testing setDropTargetActive
 void testSetEditor()
          Method testSetEditor is testing setEditor
 void testSetGetConstrainer()
          Method testSetGetConstrainer is testing setConstrainer and getConstrainer together by setting some value and verifying it by reading.
 void testSetGetDisplayUpdate()
          Method testSetGetDisplayUpdate is testing setDisplayUpdate and getDisplayUpdate together by setting some value and verifying it by reading.
 void testToggleSelection()
          Method testToggleSelection is testing toggleSelection
 void testTool()
          Method testTool is testing tool
 void testToString()
          Method testToString is testing toString
 void testUnfreezeView()
          Method testUnfreezeView is testing unfreezeView
 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

StandardDrawingViewTest

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

Method Detail

createInstance

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

Throws:
java.lang.Exception

testSetEditor

public void testSetEditor()
                   throws java.lang.Exception
Method testSetEditor is testing setEditor

Throws:
java.lang.Exception
See Also:
StandardDrawingView.setEditor(org.jhotdraw.framework.DrawingEditor)

testTool

public void testTool()
              throws java.lang.Exception
Method testTool is testing tool

Throws:
java.lang.Exception
See Also:
StandardDrawingView.tool()

testDrawing

public void testDrawing()
                 throws java.lang.Exception
Method testDrawing is testing drawing

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawing()

testSetDrawing

public void testSetDrawing()
                    throws java.lang.Exception
Method testSetDrawing is testing setDrawing

Throws:
java.lang.Exception
See Also:
StandardDrawingView.setDrawing(org.jhotdraw.framework.Drawing)

testEditor

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

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

testAdd

public void testAdd()
             throws java.lang.Exception
Method testAdd is testing add

Throws:
java.lang.Exception
See Also:
StandardDrawingView.add(org.jhotdraw.framework.Figure)

testRemove

public void testRemove()
                throws java.lang.Exception
Method testRemove is testing remove

Throws:
java.lang.Exception
See Also:
StandardDrawingView.remove(org.jhotdraw.framework.Figure)

testAddAll

public void testAddAll()
                throws java.lang.Exception
Method testAddAll is testing addAll

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addAll(java.util.Collection)

testFigureExists

public void testFigureExists()
                      throws java.lang.Exception
Method testFigureExists is testing figureExists

Throws:
java.lang.Exception
See Also:
StandardDrawingView.figureExists(org.jhotdraw.framework.Figure, org.jhotdraw.framework.FigureEnumeration)

testInsertFigures

public void testInsertFigures()
                       throws java.lang.Exception
Method testInsertFigures is testing insertFigures

Throws:
java.lang.Exception
See Also:
StandardDrawingView.insertFigures(org.jhotdraw.framework.FigureEnumeration, int, int, boolean)

testGetConnectionFigures

public void testGetConnectionFigures()
                              throws java.lang.Exception
Method testGetConnectionFigures is testing getConnectionFigures

Throws:
java.lang.Exception
See Also:
StandardDrawingView.getConnectionFigures(org.jhotdraw.framework.Figure)

testGetMinimumSize

public void testGetMinimumSize()
                        throws java.lang.Exception
Method testGetMinimumSize is testing getMinimumSize

Throws:
java.lang.Exception
See Also:
StandardDrawingView.getMinimumSize()

testGetPreferredSize

public void testGetPreferredSize()
                          throws java.lang.Exception
Method testGetPreferredSize is testing getPreferredSize

Throws:
java.lang.Exception
See Also:
JComponent.getPreferredSize()

testSetGetDisplayUpdate

public void testSetGetDisplayUpdate()
                             throws java.lang.Exception
Method testSetGetDisplayUpdate is testing setDisplayUpdate and getDisplayUpdate together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
StandardDrawingView.setDisplayUpdate(org.jhotdraw.framework.Painter), StandardDrawingView.getDisplayUpdate()

testSelection

public void testSelection()
                   throws java.lang.Exception
Method testSelection is testing selection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.selection()

testSelectionZOrdered

public void testSelectionZOrdered()
                           throws java.lang.Exception
Method testSelectionZOrdered is testing selectionZOrdered

Throws:
java.lang.Exception
See Also:
StandardDrawingView.selectionZOrdered()

testSelectionCount

public void testSelectionCount()
                        throws java.lang.Exception
Method testSelectionCount is testing selectionCount

Throws:
java.lang.Exception
See Also:
StandardDrawingView.selectionCount()

testIsFigureSelected

public void testIsFigureSelected()
                          throws java.lang.Exception
Method testIsFigureSelected is testing isFigureSelected

Throws:
java.lang.Exception
See Also:
StandardDrawingView.isFigureSelected(org.jhotdraw.framework.Figure)

testAddToSelection

public void testAddToSelection()
                        throws java.lang.Exception
Method testAddToSelection is testing addToSelection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addToSelection(org.jhotdraw.framework.Figure)

testAddToSelectionAll

public void testAddToSelectionAll()
                           throws java.lang.Exception
Method testAddToSelectionAll is testing addToSelectionAll

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addToSelectionAll(java.util.Collection)

testRemoveFromSelection

public void testRemoveFromSelection()
                             throws java.lang.Exception
Method testRemoveFromSelection is testing removeFromSelection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.removeFromSelection(org.jhotdraw.framework.Figure)

testToggleSelection

public void testToggleSelection()
                         throws java.lang.Exception
Method testToggleSelection is testing toggleSelection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.toggleSelection(org.jhotdraw.framework.Figure)

testClearSelection

public void testClearSelection()
                        throws java.lang.Exception
Method testClearSelection is testing clearSelection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.clearSelection()

testGetFigureSelection

public void testGetFigureSelection()
                            throws java.lang.Exception
Method testGetFigureSelection is testing getFigureSelection

Throws:
java.lang.Exception
See Also:
StandardDrawingView.getFigureSelection()

testFindHandle

public void testFindHandle()
                    throws java.lang.Exception
Method testFindHandle is testing findHandle

Throws:
java.lang.Exception
See Also:
StandardDrawingView.findHandle(int, int)

testLastClick

public void testLastClick()
                   throws java.lang.Exception
Method testLastClick is testing lastClick

Throws:
java.lang.Exception
See Also:
StandardDrawingView.lastClick()

testSetGetConstrainer

public void testSetGetConstrainer()
                           throws java.lang.Exception
Method testSetGetConstrainer is testing setConstrainer and getConstrainer together by setting some value and verifying it by reading.

Throws:
java.lang.Exception
See Also:
StandardDrawingView.setConstrainer(org.jhotdraw.framework.PointConstrainer), StandardDrawingView.getConstrainer()

testCheckDamage

public void testCheckDamage()
                     throws java.lang.Exception
Method testCheckDamage is testing checkDamage

Throws:
java.lang.Exception
See Also:
StandardDrawingView.checkDamage()

testRepairDamage

public void testRepairDamage()
                      throws java.lang.Exception
Method testRepairDamage is testing repairDamage

Throws:
java.lang.Exception
See Also:
StandardDrawingView.repairDamage()

testDrawingInvalidated

public void testDrawingInvalidated()
                            throws java.lang.Exception
Method testDrawingInvalidated is testing drawingInvalidated

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawingInvalidated(org.jhotdraw.framework.DrawingChangeEvent)

testDrawingRequestUpdate

public void testDrawingRequestUpdate()
                              throws java.lang.Exception
Method testDrawingRequestUpdate is testing drawingRequestUpdate

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawingRequestUpdate(org.jhotdraw.framework.DrawingChangeEvent)

testDrawingTitleChanged

public void testDrawingTitleChanged()
                             throws java.lang.Exception
Method testDrawingTitleChanged is testing drawingTitleChanged

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawingTitleChanged(org.jhotdraw.framework.DrawingChangeEvent)

testDrawAll

public void testDrawAll()
                 throws java.lang.Exception
Method testDrawAll is testing drawAll

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawAll(java.awt.Graphics)

testDraw

public void testDraw()
              throws java.lang.Exception
Method testDraw is testing draw

Throws:
java.lang.Exception
See Also:
StandardDrawingView.draw(java.awt.Graphics, org.jhotdraw.framework.FigureEnumeration)

testDrawHandles

public void testDrawHandles()
                     throws java.lang.Exception
Method testDrawHandles is testing drawHandles

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawHandles(java.awt.Graphics)

testDrawDrawing

public void testDrawDrawing()
                     throws java.lang.Exception
Method testDrawDrawing is testing drawDrawing

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawDrawing(java.awt.Graphics)

testDrawBackground

public void testDrawBackground()
                        throws java.lang.Exception
Method testDrawBackground is testing drawBackground

Throws:
java.lang.Exception
See Also:
StandardDrawingView.drawBackground(java.awt.Graphics)

testAddBackground

public void testAddBackground()
                       throws java.lang.Exception
Method testAddBackground is testing addBackground

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addBackground(org.jhotdraw.framework.Painter)

testRemoveBackground

public void testRemoveBackground()
                          throws java.lang.Exception
Method testRemoveBackground is testing removeBackground

Throws:
java.lang.Exception
See Also:
StandardDrawingView.removeBackground(org.jhotdraw.framework.Painter)

testRemoveForeground

public void testRemoveForeground()
                          throws java.lang.Exception
Method testRemoveForeground is testing removeForeground

Throws:
java.lang.Exception
See Also:
StandardDrawingView.removeForeground(org.jhotdraw.framework.Painter)

testAddForeground

public void testAddForeground()
                       throws java.lang.Exception
Method testAddForeground is testing addForeground

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addForeground(org.jhotdraw.framework.Painter)

testFreezeView

public void testFreezeView()
                    throws java.lang.Exception
Method testFreezeView is testing freezeView

Throws:
java.lang.Exception
See Also:
StandardDrawingView.freezeView()

testUnfreezeView

public void testUnfreezeView()
                      throws java.lang.Exception
Method testUnfreezeView is testing unfreezeView

Throws:
java.lang.Exception
See Also:
StandardDrawingView.unfreezeView()

testIsFocusTraversable

public void testIsFocusTraversable()
                            throws java.lang.Exception
Method testIsFocusTraversable is testing isFocusTraversable

Throws:
java.lang.Exception
See Also:
StandardDrawingView.isFocusTraversable()

testIsInteractive

public void testIsInteractive()
                       throws java.lang.Exception
Method testIsInteractive is testing isInteractive

Throws:
java.lang.Exception
See Also:
StandardDrawingView.isInteractive()

testKeyTyped

public void testKeyTyped()
                  throws java.lang.Exception
Method testKeyTyped is testing keyTyped

Throws:
java.lang.Exception
See Also:
StandardDrawingView.keyTyped(java.awt.event.KeyEvent)

testKeyReleased

public void testKeyReleased()
                     throws java.lang.Exception
Method testKeyReleased is testing keyReleased

Throws:
java.lang.Exception
See Also:
StandardDrawingView.keyReleased(java.awt.event.KeyEvent)

testAddFigureSelectionListener

public void testAddFigureSelectionListener()
                                    throws java.lang.Exception
Method testAddFigureSelectionListener is testing addFigureSelectionListener

Throws:
java.lang.Exception
See Also:
StandardDrawingView.addFigureSelectionListener(org.jhotdraw.framework.FigureSelectionListener)

testRemoveFigureSelectionListener

public void testRemoveFigureSelectionListener()
                                       throws java.lang.Exception
Method testRemoveFigureSelectionListener is testing removeFigureSelectionListener

Throws:
java.lang.Exception
See Also:
StandardDrawingView.removeFigureSelectionListener(org.jhotdraw.framework.FigureSelectionListener)

testGetDefaultDNDActions

public void testGetDefaultDNDActions()
                              throws java.lang.Exception
Method testGetDefaultDNDActions is testing getDefaultDNDActions

Throws:
java.lang.Exception
See Also:
StandardDrawingView.getDefaultDNDActions()

testAutoscroll

public void testAutoscroll()
                    throws java.lang.Exception
Method testAutoscroll is testing autoscroll

Throws:
java.lang.Exception
See Also:
StandardDrawingView.autoscroll(java.awt.Point)

testGetAutoscrollInsets

public void testGetAutoscrollInsets()
                             throws java.lang.Exception
Method testGetAutoscrollInsets is testing getAutoscrollInsets

Throws:
java.lang.Exception
See Also:
StandardDrawingView.getAutoscrollInsets()

testToString

public void testToString()
                  throws java.lang.Exception
Method testToString is testing toString

Throws:
java.lang.Exception
See Also:
StandardDrawingView.toString()

testSetDragSourceActive

public void testSetDragSourceActive()
                             throws java.lang.Exception
Method testSetDragSourceActive is testing setDragSourceActive

Throws:
java.lang.Exception
See Also:
org.jhotdraw.standard.StandardDrawingView#setDragSourceActive(boolean)

testSetDropTargetActive

public void testSetDropTargetActive()
                             throws java.lang.Exception
Method testSetDropTargetActive is testing setDropTargetActive

Throws:
java.lang.Exception
See Also:
org.jhotdraw.standard.StandardDrawingView#setDropTargetActive(boolean)

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