com.rolemodelsoft.drawlet.basics
Class TC_AbstractFigure

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--com.rolemodelsoft.drawlet.basics.TC_AbstractFigure
Direct Known Subclasses:
TC_AdornedLine, TC_Arrow, TC_Ellipse, TC_Polygon, TC_RoundedRectangle, TC_TextLabel

public class TC_AbstractFigure
extends junit.framework.TestCase


Field Summary
protected  AbstractFigure figure
           
protected  RelatedLocationRevealer locationRevealer
           
protected  PropertyChangeRevealer propertyRevealer
           
 
Fields inherited from class junit.framework.TestCase
result
 
Constructor Summary
TC_AbstractFigure(java.lang.String name)
          BasicStringRendererTest constructor comment.
 
Method Summary
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
 void testAddPropertyChangeListener()
          Test to make sure PropertyChangeListeners are being added correctly.
 void testAddRelatedLocationListener()
          Test to make sure RelatedLocationListeners are being added correctly.
 void testContainsFigure()
          Test to make sure the contains( Figure ) method is functioning properly.
 void testContainsIntInt()
          Test to make sure the contains( int, int ) method is functioning properly.
 void testContainsRectangle()
          Test to make sure the contains( Rectangle ) method is functioning properly.
 void testDisconnect()
          Test to make sure that (a) the figure is firing the disconnect event, and (b) that it then doesn't fire anything else ( at least until someone else registers).
 void testEditTool()
          Test to make sure that the edit tool returned is null.
 void testGetBottom()
          Test to make sure the bottom is properly returned.
 void testGetHandles()
          Test to make sure the handles are properly returned.
 void testGetHeight()
          Test to make sure the height of the figure is properly returned.
 void testGetLeft()
          Test to make sure the leftmost coordinate of the figure is properly returned.
 void testGetLocator()
          Test to make sure the locator is properly returned.
 void testGetRight()
          Test to make sure the rightmost coordinate of the figure is properly returned.
 void testGetSize()
          Test to make sure the size of the figure is properly returned.
 void testGetStyle()
          Test to make sure the style returned is correct.
 void testGetTop()
          Test to make sure the top is properly returned.
 void testGetWidth()
          Test to make sure the width of the figure is properly returned.
 void testIntersectsFigure()
          Test to make sure the intersects( Figure ) method is functioning properly.
 void testIntersectsRectangle()
          Test to make sure the intersects( Rectangle ) method is functioning properly.
 void testIsObsolete()
          Test to make sure the isObsolete() is functioning properly.
 void testIsWithinFigure()
          Test to make sure the isWithin( Figure ) method is functioning properly.
 void testIsWithinRectangle()
          Test to make sure the isWithin( Rectangle ) method is functioning properly.
 void testLocatorAt()
          Test to make sure locatorAt returns the proper value.
 void testMoveIntInt()
          Test to make sure move( int, int ) works correctly.
 void testMoveLocator()
          Test to make sure move( Locator ) works correctly.
 void testRelatedLocationListeners()
          Test to make sure relatedLocationListeners works correctly.
 void testRemovePropertyChangeListener()
          Test to make sure PropertyChangeListeners are being removed correctly.
 void testRemoveRelatedLocationListener()
          Test to make sure RelatedLocationListeners are being removed correctly.
 void testRequestConnection()
          Test to make sure the locator is properly returned.
 void testSetBounds()
          Test to make sure the bounds are properly set.
 void testSetSizeDimension()
          Test to make sure the setSize( Dimension ) method is working properly.
 void testSetSizeIntInt()
          Test to make sure the setSize( int, int ) method is working properly.
 void testSetStyle()
          Test to make sure the setStyle method is working properly.
 void testTranslate()
          Test to make sure translate works correctly.
protected  void translateByExpecting(int startX, int startY, int expectedX, int expectedY)
          Test to make sure translate works correctly.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, onAssertion, run, run, runBare, runTest, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

figure

protected AbstractFigure figure

propertyRevealer

protected PropertyChangeRevealer propertyRevealer

locationRevealer

protected RelatedLocationRevealer locationRevealer
Constructor Detail

TC_AbstractFigure

public TC_AbstractFigure(java.lang.String name)
BasicStringRendererTest constructor comment.
Parameters:
name - java.lang.String
Method Detail

setUp

protected void setUp()
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.
Overrides:
setUp in class junit.framework.TestCase

testAddPropertyChangeListener

public void testAddPropertyChangeListener()
Test to make sure PropertyChangeListeners are being added correctly.

testAddRelatedLocationListener

public void testAddRelatedLocationListener()
Test to make sure RelatedLocationListeners are being added correctly.

testContainsFigure

public void testContainsFigure()
Test to make sure the contains( Figure ) method is functioning properly.

testContainsIntInt

public void testContainsIntInt()
Test to make sure the contains( int, int ) method is functioning properly.

testContainsRectangle

public void testContainsRectangle()
Test to make sure the contains( Rectangle ) method is functioning properly.

testDisconnect

public void testDisconnect()
Test to make sure that (a) the figure is firing the disconnect event, and (b) that it then doesn't fire anything else ( at least until someone else registers).

testEditTool

public void testEditTool()
Test to make sure that the edit tool returned is null. Subclasses should override if they return expect a different result.

testGetBottom

public void testGetBottom()
Test to make sure the bottom is properly returned.

testGetHandles

public void testGetHandles()
Test to make sure the handles are properly returned.

testGetHeight

public void testGetHeight()
Test to make sure the height of the figure is properly returned.

testGetLeft

public void testGetLeft()
Test to make sure the leftmost coordinate of the figure is properly returned.

testGetLocator

public void testGetLocator()
Test to make sure the locator is properly returned.

testGetRight

public void testGetRight()
Test to make sure the rightmost coordinate of the figure is properly returned.

testGetSize

public void testGetSize()
Test to make sure the size of the figure is properly returned.

testGetStyle

public void testGetStyle()
Test to make sure the style returned is correct.

testGetTop

public void testGetTop()
Test to make sure the top is properly returned.

testGetWidth

public void testGetWidth()
Test to make sure the width of the figure is properly returned.

testIntersectsFigure

public void testIntersectsFigure()
Test to make sure the intersects( Figure ) method is functioning properly.

testIntersectsRectangle

public void testIntersectsRectangle()
Test to make sure the intersects( Rectangle ) method is functioning properly.

testIsObsolete

public void testIsObsolete()
Test to make sure the isObsolete() is functioning properly.

testIsWithinFigure

public void testIsWithinFigure()
Test to make sure the isWithin( Figure ) method is functioning properly.

testIsWithinRectangle

public void testIsWithinRectangle()
Test to make sure the isWithin( Rectangle ) method is functioning properly.

testLocatorAt

public void testLocatorAt()
Test to make sure locatorAt returns the proper value.

testMoveIntInt

public void testMoveIntInt()
Test to make sure move( int, int ) works correctly.

testMoveLocator

public void testMoveLocator()
Test to make sure move( Locator ) works correctly.

testRelatedLocationListeners

public void testRelatedLocationListeners()
Test to make sure relatedLocationListeners works correctly.

testRemovePropertyChangeListener

public void testRemovePropertyChangeListener()
Test to make sure PropertyChangeListeners are being removed correctly.

testRemoveRelatedLocationListener

public void testRemoveRelatedLocationListener()
Test to make sure RelatedLocationListeners are being removed correctly.

testRequestConnection

public void testRequestConnection()
Test to make sure the locator is properly returned.

testSetBounds

public void testSetBounds()
Test to make sure the bounds are properly set.

testSetSizeDimension

public void testSetSizeDimension()
Test to make sure the setSize( Dimension ) method is working properly.

testSetSizeIntInt

public void testSetSizeIntInt()
Test to make sure the setSize( int, int ) method is working properly.

testSetStyle

public void testSetStyle()
Test to make sure the setStyle method is working properly.

testTranslate

public void testTranslate()
Test to make sure translate works correctly.

translateByExpecting

protected void translateByExpecting(int startX,
                                    int startY,
                                    int expectedX,
                                    int expectedY)
Test to make sure translate works correctly.