CS 1705 Library

objectdraw
Class StudentTestableWindowController

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by objectdraw.Controller
                          extended by objectdraw.WindowController
                              extended by objectdraw.FrameWindowController
                                  extended by objectdraw.TestableWindowController
                                      extended by objectdraw.StudentTestableWindowController
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public class StudentTestableWindowController
extends TestableWindowController

This is an extension to the TestableWindowController that includes "wrapper"-like assertions that keep Students from having to make use of the more complicated but more generic assertion statements in TestableWindowController.

For most of your programming assignments, you will be extending an instance of the StudentTestableWindowController class. For Example:

 public class Cube
     extends StudentTestableWindowController
 {
      ...
 }
 

Therefore, all instantiations of the class that you create can make use of the assert statements presented below. Unlike the typical JUnit assert statements, these must called as instance methods on an object:

 Cube x = new Cube();

 x.assertCanvasEmpty();
 

The TestableWindowController class that StudentTestableWindowController class inherits from contains additional assert statements that can be referenced the same way. These methods are far more generic than the more specific functions in StudentTestableWindowController. The StudentTestableWindowController will be useful for a lot of your purposes, but a more generic function may be useful, from time to time.

Version:
.2 July 31, 2006
Author:
Matthew Thornton
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
StudentTestableWindowController()
           
 
Method Summary
 void assertCanvasEmpty()
          Asserts there are no visible shape objects on the canvas.
 void assertColor(double x, double y, Color color)
          assertColor asserts that the shape being evaluated has the desired color.
 void assertColor(objectdraw.DrawableInterface shape, Color color)
          assertColor asserts that the shape being evaluated has the desired color.
 void assertCorrectArcAngle(objectdraw.FilledArc shape, double angle)
          assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.
 void assertCorrectArcAngle(objectdraw.FramedArc shape, double angle)
          assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.
 void assertCorrectArcHeight(objectdraw.FilledRoundedRect shape, double height)
          assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.
 void assertCorrectArcHeight(objectdraw.FramedRoundedRect shape, double height)
          assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.
 void assertCorrectArcWidth(objectdraw.FilledRoundedRect shape, double width)
          assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.
 void assertCorrectArcWidth(objectdraw.FramedRoundedRect shape, double width)
          assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.
 void assertCorrectFilledArcAngle(double x, double y, double angle)
          assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.
 void assertCorrectFilledArcStartAngle(double x, double y, double angle)
          assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.
 void assertCorrectFilledRoundedRectArcHeight(double x, double y, double height)
          assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.
 void assertCorrectFilledRoundedRectArcWidth(double x, double y, double width)
          assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.
 void assertCorrectFont(double x, double y, Font font)
          assertCorrectFont asserts that the textbox being evaluated is displaying the correct font.
 void assertCorrectFont(objectdraw.Text shape, Font font)
          assertCorrectFont asserts that the textbox being evaluated is displaying the correct font.
 void assertCorrectFramedArcAngle(double x, double y, double angle)
          assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.
 void assertCorrectFramedArcStartAngle(double x, double y, double angle)
          assertCorrectStartAngle asserts that the frame arc being evaluated has the correct starting angle.
 void assertCorrectFramedRoundedRectArcHeight(double x, double y, double height)
          assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.
 void assertCorrectFramedRoundedRectArcWidth(double x, double y, double width)
          assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.
 void assertCorrectImage(double x, double y, Image image)
          assertCorrectImage asserts that the VisibleImage displayed is the correct image.
 void assertCorrectImage(objectdraw.VisibleImage shape, Image image)
          assertCorrectImage asserts that the VisibleImage displayed is the correct image.
 void assertCorrectStartAngle(objectdraw.FilledArc shape, double angle)
          assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.
 void assertCorrectStartAngle(objectdraw.FramedArc shape, double angle)
          assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.
 void assertCorrectText(double x, double y, String text)
          assertCorrectText asserts that the textbox being evaluated is displaying the correct text.
 void assertCorrectText(objectdraw.Text shape, String text)
          assertCorrectText asserts that the textbox being evaluated is displaying the correct text.
 void assertExistAngLine(double x, double y)
          assertExistAngLine asserts that there exists an angle line at the given starting location.
 void assertExistFilledArc(double x, double y)
          assertExistFilledArc asserts that there exists a filled arc at the specified (x, y) position
 void assertExistFilledOval(double x, double y)
          assertExistFilledOval asserts that there exists a filled oval at the specified (x, y) position
 void assertExistFilledRect(double x, double y)
          assertExistFilledRect asserts that there exists a filled rectangle at the specified (x, y) position
 void assertExistFilledRoundedRect(double x, double y)
          assertExistFilledRoundedRect asserts that there exists a filled, rounded rectangle at the specified (x, y) position
 void assertExistFramedArc(double x, double y)
          assertExistFramedArc asserts that there exists a framed arc at the specified (x, y) position
 void assertExistFramedOval(double x, double y)
          assertExistFramedOval asserts that there exists a framed oval at the specified (x, y) position
 void assertExistFramedRect(double x, double y)
          assertExistFramedRect asserts that there exists a framed rectangle at the specified (x, y) position
 void assertExistFramedRoundedRect(double x, double y)
          assertExistFramedRect asserts that there exists a framed, rounded rectangle at the specified (x, y) position
 void assertExistLine(double startx, double starty)
          assertExistLine asserts that there exists a line starting at the specified (x, y) position
 void assertExistLine(double startx, double starty, double endx, double endy)
          assertExistLine asserts that there exists a line connection the start and end points.
 void assertExistText(double x, double y)
          assertExistText asserts that there exists a textbox at the specified (x, y) position
 void assertExistVisibleImage(double x, double y)
          assertExistVisibleImage asserts that there exists a VisibleImage at the specified (x, y) position
 void assertHeight(double x, double y, double height)
          assertHeight asserts that the shape being evaluated is a desired height.
 void assertHeight(objectdraw.Drawable2DInterface shape, double height)
          assertHeight asserts that the shape being evaluated is a desired height.
 void assertInvisible(double x, double y)
          assertInvisible asserts that the shape being evaluated is invisible to the canvas.
 void assertInvisible(objectdraw.DrawableInterface shape)
          assertInvisible asserts that the shape being evaluated is invisible to the canvas.
 void assertIsAnEndpoint(double x, double y, double epx, double epy)
          assertIsAnEndpoint asserts that a line being tested has an endpoint at the given position.
 void assertIsAnEndpoint(objectdraw.Line shape, double x, double y)
          assertIsAnEndpoint asserts that a line being tested has an endpoint at the given position.
 void assertLocationInShape(double x, double y, double xLoc, double yLoc)
          assertLocationInShape asserts that the shape being evaluated includes the specified (x,y) coordinate.
 void assertLocationInShape(objectdraw.Drawable2DInterface shape, double x, double y)
          assertLocationInShape asserts that the shape being evaluated includes the specified (x,y) coordinate.
 void assertNotCanvasEmpty()
          Asserts there is at least one visible element on the canvas.
 void assertVisible(double x, double y)
          assertVisible asserts that the shape being evaluated is visible
 void assertVisible(objectdraw.DrawableInterface shape)
          assertVisible asserts that the shape being evaluated is visible
 void assertWidth(double x, double y, double width)
          assertWidth asserts that the shape being evaluated is a desired width.
 void assertWidth(objectdraw.Drawable2DInterface shape, double width)
          assertWidth asserts that the shape being evaluated is a desired width.
 
Methods inherited from class objectdraw.TestableWindowController
assertHas2DObject, assertHas2DObject, assertHasLine, assertHasLine, assertNo2DObject, assertNo2DObject, assertNoLine, assertNoLine, get2DObject, get2DObjects, getCanvas, getFrame, getLine, getLines, has2DObject, hasLine, paint, waitForInit
 
Methods inherited from class objectdraw.WindowController
begin, onMouseClick, onMouseDrag, onMouseEnter, onMouseExit, onMouseMove, onMousePress, onMouseRelease
 
Methods inherited from class objectdraw.Controller
destroy, getAudio, getImage, getTime, getVersion, init, placeInFrame, resize, start, startController, startController, stop
 
Methods inherited from class javax.swing.JApplet
getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StudentTestableWindowController

public StudentTestableWindowController()
Method Detail

assertCanvasEmpty

public void assertCanvasEmpty()
Asserts there are no visible shape objects on the canvas.


assertNotCanvasEmpty

public void assertNotCanvasEmpty()
Asserts there is at least one visible element on the canvas.


assertExistFramedRect

public void assertExistFramedRect(double x,
                                  double y)
assertExistFramedRect asserts that there exists a framed rectangle at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFilledRect

public void assertExistFilledRect(double x,
                                  double y)
assertExistFilledRect asserts that there exists a filled rectangle at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistAngLine

public void assertExistAngLine(double x,
                               double y)
assertExistAngLine asserts that there exists an angle line at the given starting location.

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFilledArc

public void assertExistFilledArc(double x,
                                 double y)
assertExistFilledArc asserts that there exists a filled arc at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFilledOval

public void assertExistFilledOval(double x,
                                  double y)
assertExistFilledOval asserts that there exists a filled oval at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFramedArc

public void assertExistFramedArc(double x,
                                 double y)
assertExistFramedArc asserts that there exists a framed arc at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFramedOval

public void assertExistFramedOval(double x,
                                  double y)
assertExistFramedOval asserts that there exists a framed oval at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFramedRoundedRect

public void assertExistFramedRoundedRect(double x,
                                         double y)
assertExistFramedRect asserts that there exists a framed, rounded rectangle at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistFilledRoundedRect

public void assertExistFilledRoundedRect(double x,
                                         double y)
assertExistFilledRoundedRect asserts that there exists a filled, rounded rectangle at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistLine

public void assertExistLine(double startx,
                            double starty)
assertExistLine asserts that there exists a line starting at the specified (x, y) position

Parameters:
startx - the x coordinate where the line begins
starty - the y coordinate where the line begins

assertExistLine

public void assertExistLine(double startx,
                            double starty,
                            double endx,
                            double endy)
assertExistLine asserts that there exists a line connection the start and end points.

Parameters:
startx - the x coordinate where the line begins.
starty - the y coordinate where the line begins.
endx - the x coordinate where the line ends.
endy - the y coordinate where the line ends.

assertExistText

public void assertExistText(double x,
                            double y)
assertExistText asserts that there exists a textbox at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertExistVisibleImage

public void assertExistVisibleImage(double x,
                                    double y)
assertExistVisibleImage asserts that there exists a VisibleImage at the specified (x, y) position

Parameters:
x - the x coordinate
y - the y coordinate

assertColor

public void assertColor(double x,
                        double y,
                        Color color)
assertColor asserts that the shape being evaluated has the desired color.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
color - the color that is desired.

assertVisible

public void assertVisible(double x,
                          double y)
assertVisible asserts that the shape being evaluated is visible

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.

assertInvisible

public void assertInvisible(double x,
                            double y)
assertInvisible asserts that the shape being evaluated is invisible to the canvas.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.

assertWidth

public void assertWidth(double x,
                        double y,
                        double width)
assertWidth asserts that the shape being evaluated is a desired width.

Parameters:
x - the x coordinats of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
width - the desired width of shape

assertHeight

public void assertHeight(double x,
                         double y,
                         double height)
assertHeight asserts that the shape being evaluated is a desired height.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
height - the desired height of shape.

assertLocationInShape

public void assertLocationInShape(double x,
                                  double y,
                                  double xLoc,
                                  double yLoc)
assertLocationInShape asserts that the shape being evaluated includes the specified (x,y) coordinate.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
xLoc - the x coordinate of the location to be tested
yLoc - the y coordinate of the location to be tested

assertCorrectFramedArcStartAngle

public void assertCorrectFramedArcStartAngle(double x,
                                             double y,
                                             double angle)
assertCorrectStartAngle asserts that the frame arc being evaluated has the correct starting angle.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectFilledArcStartAngle

public void assertCorrectFilledArcStartAngle(double x,
                                             double y,
                                             double angle)
assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectFramedArcAngle

public void assertCorrectFramedArcAngle(double x,
                                        double y,
                                        double angle)
assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectFilledArcAngle

public void assertCorrectFilledArcAngle(double x,
                                        double y,
                                        double angle)
assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectFramedRoundedRectArcWidth

public void assertCorrectFramedRoundedRectArcWidth(double x,
                                                   double y,
                                                   double width)
assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
width - the appropriate width for shape.

assertCorrectFramedRoundedRectArcHeight

public void assertCorrectFramedRoundedRectArcHeight(double x,
                                                    double y,
                                                    double height)
assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
height - the appropriate height for shape.

assertCorrectFilledRoundedRectArcWidth

public void assertCorrectFilledRoundedRectArcWidth(double x,
                                                   double y,
                                                   double width)
assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
width - the appropriate width for shape.

assertCorrectFilledRoundedRectArcHeight

public void assertCorrectFilledRoundedRectArcHeight(double x,
                                                    double y,
                                                    double height)
assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
height - the appropriate height for shape.

assertCorrectText

public void assertCorrectText(double x,
                              double y,
                              String text)
assertCorrectText asserts that the textbox being evaluated is displaying the correct text.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
text - desired text

assertCorrectFont

public void assertCorrectFont(double x,
                              double y,
                              Font font)
assertCorrectFont asserts that the textbox being evaluated is displaying the correct font.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
font - desired font

assertIsAnEndpoint

public void assertIsAnEndpoint(double x,
                               double y,
                               double epx,
                               double epy)
assertIsAnEndpoint asserts that a line being tested has an endpoint at the given position.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
epx - x coordinate of point
epy - y coordinate of point

assertCorrectImage

public void assertCorrectImage(double x,
                               double y,
                               Image image)
assertCorrectImage asserts that the VisibleImage displayed is the correct image.

Parameters:
x - the x coordinate of the shape being evaluated.
y - the y coordinate of the shape being evaluated.
image - the correct image to be displayed in VisibleImage.

assertColor

public void assertColor(objectdraw.DrawableInterface shape,
                        Color color)
assertColor asserts that the shape being evaluated has the desired color.

Parameters:
shape - the shape being evaluated.
color - the color that is desired.

assertVisible

public void assertVisible(objectdraw.DrawableInterface shape)
assertVisible asserts that the shape being evaluated is visible

Parameters:
shape - the shape being evaluated.

assertInvisible

public void assertInvisible(objectdraw.DrawableInterface shape)
assertInvisible asserts that the shape being evaluated is invisible to the canvas.

Parameters:
shape - the shape being evaluated.

assertWidth

public void assertWidth(objectdraw.Drawable2DInterface shape,
                        double width)
assertWidth asserts that the shape being evaluated is a desired width.

Parameters:
shape - the shape being evaluated
width - the desired width of shape

assertHeight

public void assertHeight(objectdraw.Drawable2DInterface shape,
                         double height)
assertHeight asserts that the shape being evaluated is a desired height.

Parameters:
shape - the shape being evaluated.
height - the desired height of shape.

assertLocationInShape

public void assertLocationInShape(objectdraw.Drawable2DInterface shape,
                                  double x,
                                  double y)
assertLocationInShape asserts that the shape being evaluated includes the specified (x,y) coordinate.

Parameters:
shape - the shape being evaluated.
x - the x coordinate
y - the y coordinate

assertCorrectStartAngle

public void assertCorrectStartAngle(objectdraw.FramedArc shape,
                                    double angle)
assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.

Parameters:
shape - the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectStartAngle

public void assertCorrectStartAngle(objectdraw.FilledArc shape,
                                    double angle)
assertCorrectStartAngle asserts that the shape being evaluated has the correct starting angle.

Parameters:
shape - the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectArcAngle

public void assertCorrectArcAngle(objectdraw.FramedArc shape,
                                  double angle)
assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.

Parameters:
shape - the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectArcAngle

public void assertCorrectArcAngle(objectdraw.FilledArc shape,
                                  double angle)
assertCorrectArcAngle asserts that the shape being evaluated spans the correct angle.

Parameters:
shape - the shape being evaluated.
angle - angle that is to be evaluated.

assertCorrectArcWidth

public void assertCorrectArcWidth(objectdraw.FramedRoundedRect shape,
                                  double width)
assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.

Parameters:
shape - the shape being evaluated.
width - the appropriate width for shape.

assertCorrectArcHeight

public void assertCorrectArcHeight(objectdraw.FramedRoundedRect shape,
                                   double height)
assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.

Parameters:
shape - the shape being evaluated.
height - the appropriate height for shape.

assertCorrectArcWidth

public void assertCorrectArcWidth(objectdraw.FilledRoundedRect shape,
                                  double width)
assertCorrectArcWidth asserts that the shape being evaluated has a correct corner arc width.

Parameters:
shape - the shape being evaluated.
width - the appropriate width for shape.

assertCorrectArcHeight

public void assertCorrectArcHeight(objectdraw.FilledRoundedRect shape,
                                   double height)
assertCorrectArcHeight asserts that the shape being evaluated has a correct corner arc height.

Parameters:
shape - the shape being evaluated.
height - the appropriate height for shape.

assertCorrectText

public void assertCorrectText(objectdraw.Text shape,
                              String text)
assertCorrectText asserts that the textbox being evaluated is displaying the correct text.

Parameters:
shape - the shape being evaluated.
text - desired text

assertCorrectFont

public void assertCorrectFont(objectdraw.Text shape,
                              Font font)
assertCorrectFont asserts that the textbox being evaluated is displaying the correct font.

Parameters:
shape - the shape being evaluated.
font - desired font

assertIsAnEndpoint

public void assertIsAnEndpoint(objectdraw.Line shape,
                               double x,
                               double y)
assertIsAnEndpoint asserts that a line being tested has an endpoint at the given position.

Parameters:
shape - the shape being evaluated.
x - x coordinate of point
y - y coordinate of point

assertCorrectImage

public void assertCorrectImage(objectdraw.VisibleImage shape,
                               Image image)
assertCorrectImage asserts that the VisibleImage displayed is the correct image.

Parameters:
shape - the shape being evaluated.
image - the correct image to be displayed in VisibleImage.

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.