public class ObjectdrawTestCase extends GUITestCase
GUITestCase
to support
testing of objectdraw graphics programs that use DrawableInterface
instances.GUITestCase.EventDispatchException
TestCase.AssertMethodCalledIncorrectly
Modifier and Type | Field and Description |
---|---|
ObjectdrawFilter.Operator |
where
This field re-exports the
where operator from
ObjectdrawFilter so that it is available
in test methods without requiring a static import. |
DISPOSE_CLASSES
Constructor and Description |
---|
ObjectdrawTestCase()
Creates a new ObjectdrawTestCase object.
|
ObjectdrawTestCase(String name)
Creates a new ObjectdrawTestCase object.
|
Modifier and Type | Method and Description |
---|---|
<T extends objectdraw.DrawableInterface> |
getAllDrawablesMatching(Class<T> type)
Look up all
DrawableInterface objects on the canvas of the
WindowController being tested by specifying their
class. |
<T extends objectdraw.DrawableInterface> |
getAllDrawablesMatching(Class<T> type,
ObjectdrawFilter filter)
Look up all
DrawableInterface objects on the canvas of the
WindowController being tested by specifying their
class and an ObjectdrawFilter . |
List<objectdraw.DrawableInterface> |
getAllDrawablesMatching(ObjectdrawFilter filter)
Look up all
DrawableInterface objects on the canvas of the
WindowController being tested by specifying
an ObjectdrawFilter . |
protected objectdraw.DrawingCanvas |
getCanvas()
Retrieve the
JDrawingCanvas object associated
with the WindowController being tested. |
<T extends objectdraw.DrawableInterface> |
getDrawable(Class<T> type)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested by specifying
its class. |
<T extends objectdraw.DrawableInterface> |
getDrawable(Class<T> type,
ObjectdrawFilter filter)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested by specifying its class
and an ObjectdrawFilter . |
objectdraw.DrawableInterface |
getDrawable(ObjectdrawFilter filter)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested, using a filter to
specify which object you want. |
<T extends objectdraw.DrawableInterface> |
getFirstDrawableMatching(Class<T> type)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested by specifying its class. |
<T extends objectdraw.DrawableInterface> |
getFirstDrawableMatching(Class<T> type,
ObjectdrawFilter filter)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested by specifying its class
and an ObjectdrawFilter . |
objectdraw.DrawableInterface |
getFirstDrawableMatching(ObjectdrawFilter filter)
Look up a
DrawableInterface object on the canvas of the
WindowController being tested by specifying
an ObjectdrawFilter . |
callGUIIOMethod, callGUIIOMethod, callGUIIOMethod, click, click, click, clickDialogButton, createHierarchy, doubleClick, doubleClick, enterText, fixtureSetUp, fixtureTearDown, focus, getAllComponentsMatching, getAllComponentsMatching, getAllComponentsMatching, getComponent, getComponent, getComponent, getComponent, getContents, getContents, getFinder, getFirstComponentMatching, getFirstComponentMatching, getFirstComponentMatching, getHierarchy, getPathFor, getRobot, getWindowTracker, keyPress, keyRelease, keyString, keyStroke, keyStroke, mouseDragFrom, mouseDragFrom, mouseDragOver, mouseDropOn, mouseDropOn, mouseExit, mouseMove, mousePress, mousePress, mouseRelease, not, rightClick, rightClick, runBare, runTestMethod, selectColorInChooser, selectFileInChooser, selectFilesInChooser, selectItem, selectItem, selectMenuItem, setInputDialogText, setModifiers, setSwitchFocus, showInFrame, showInFrame, showWindow, showWindow, sleep, toString, toString, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertFuzzyEquals, assertFuzzyEquals, assertSame, assertSame, assertTrue, assertTrue, compact, compact, contains, containsRegex, containsRegex, equals, equalsRegex, equalsRegex, fromFile, fromFile, fuzzyContains, fuzzyContainsRegex, fuzzyContainsRegex, fuzzyEquals, fuzzyEqualsRegex, fuzzyEqualsRegex, in, installExitHandler, instrumentIO, multiline, out, prepareIO, resetIO, resetSystemIO, setIn, setIn, setNormalizeLineEndings, setSystemIn, setUp, setUseFuzzyStringComparisons, stringNormalizer, systemErr, systemOut, tearDown, uninstallExitHandler
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
public final ObjectdrawFilter.Operator where
where
operator from
ObjectdrawFilter
so that it is available
in test methods without requiring a static import.public ObjectdrawTestCase()
public ObjectdrawTestCase(String name)
name
- The name of this test case.public <T extends objectdraw.DrawableInterface> T getDrawable(Class<T> type)
DrawableInterface
object on the canvas of the
WindowController
being tested by specifying
its class. This method expects the given class to identify a unique
DrawableInterface object, meaning that there should only be one
instance of the given class on the canvas.
If no matching object exists, the test case will
fail with an appropriate message. If more than one matching
object exists, the test case will fail with an appropriate message.T
- This method is a template method, and the type T used for
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the object you wish to retrieve, and
also the way you specify the return type of this method.getFirstDrawableMatching(Class)
,
getAllDrawablesMatching(Class)
public <T extends objectdraw.DrawableInterface> T getDrawable(Class<T> type, ObjectdrawFilter filter)
DrawableInterface
object on the canvas of the
WindowController
being tested by specifying its class
and an ObjectdrawFilter
.
This method expects exactly one DrawableInterface object to match your
criteria. If no matching object exists, the test
case will fail with an appropriate message. If more than one matching
object exists, the test case will fail with an appropriate message.T
- This method is a template method, and the type T used for
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the object you wish to retrieve, and
also the way you specify the return type of this method.filter
- The search criteria.getFirstDrawableMatching(Class, ObjectdrawFilter)
,
getAllDrawablesMatching(Class, ObjectdrawFilter)
public objectdraw.DrawableInterface getDrawable(ObjectdrawFilter filter)
DrawableInterface
object on the canvas of the
WindowController
being tested, using a filter to
specify which object you want. This method is more general
than getDrawable(Class, ObjectdrawFilter)
, since no class
needs to be specified, but that also means the return type is less
specific (it is always DrawableInterface
).
This method expects the given filter
to identify a unique DrawableInterface object. If no matching
object exists, the test case will fail with an appropriate message.
If more than one matching object exists, the test case will fail
with an appropriate message.filter
- The search criteria.getFirstDrawableMatching(ObjectdrawFilter)
,
getAllDrawablesMatching(ObjectdrawFilter)
public <T extends objectdraw.DrawableInterface> T getFirstDrawableMatching(Class<T> type)
DrawableInterface
object on the canvas of the
WindowController
being tested by specifying its class.
This method expects the given class to identify at least one such
DrawableInterface object. If no matching object
exists, the test case will fail with an appropriate message. If more
than one matching object exists, the first one found will be returned
(although client code should not expect a specific search order).T
- This method is a template method, and the type T used for
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the object you wish to retrieve, and
also the way you specify the return type of this method.getDrawable(Class)
,
getAllDrawablesMatching(Class)
public <T extends objectdraw.DrawableInterface> T getFirstDrawableMatching(Class<T> type, ObjectdrawFilter filter)
DrawableInterface
object on the canvas of the
WindowController
being tested by specifying its class
and an ObjectdrawFilter
.
This method expects the given criteria to identify at least one such
DrawableInterface object. If no matching object exists, the test case
will fail with an appropriate message. If more than one matching
object exists, the first one found will be returned (although client
code should not expect a specific search order).T
- This method is a template method, and the type T used for
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the object you wish to retrieve, and
also the way you specify the return type of this method.filter
- The search criteria.getDrawable(Class,ObjectdrawFilter)
,
getAllDrawablesMatching(Class, ObjectdrawFilter)
public objectdraw.DrawableInterface getFirstDrawableMatching(ObjectdrawFilter filter)
DrawableInterface
object on the canvas of the
WindowController
being tested by specifying
an ObjectdrawFilter
. This method is more general
than getFirstDrawableMatching(Class, ObjectdrawFilter)
, since
no class needs to be specified, but that also means the return type
is less specific (it is always DrawableInterface
).
This method expects the given criteria to identify at least one such
DrawableInterface object. If no matching object exists, the test case
will fail with an appropriate message. If more than one matching object
exists, the first one found will be returned (although client code
should not expect a specific search order).filter
- The search criteria.getDrawable(ObjectdrawFilter)
,
getAllDrawablesMatching(ObjectdrawFilter)
public <T extends objectdraw.DrawableInterface> List<T> getAllDrawablesMatching(Class<T> type)
DrawableInterface
objects on the canvas of the
WindowController
being tested by specifying their
class. All matching objects are returned in a list.T
- This method is a template method, and the type T used as
the List
element type in
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the objects you wish to retrieve,
and also the way you specify the type of elements in
the list returned by this method.getDrawable(Class)
,
getFirstDrawableMatching(Class)
public <T extends objectdraw.DrawableInterface> List<T> getAllDrawablesMatching(Class<T> type, ObjectdrawFilter filter)
DrawableInterface
objects on the canvas of the
WindowController
being tested by specifying their
class and an ObjectdrawFilter
. All matching objects are
returned in a list.T
- This method is a template method, and the type T used as
the List
element type in
the return value is implicitly deduced from the provided
argument type
.type
- The type (class) of the objects you wish to retrieve,
and also the way you specify the type of elements in
the list returned by this method.filter
- The search criteria.getDrawable(Class,ObjectdrawFilter)
,
getAllDrawablesMatching(Class,ObjectdrawFilter)
public List<objectdraw.DrawableInterface> getAllDrawablesMatching(ObjectdrawFilter filter)
DrawableInterface
objects on the canvas of the
WindowController
being tested by specifying
an ObjectdrawFilter
. All matching objects are returned in a
list. This method is more general than
getAllDrawablesMatching(Class, ObjectdrawFilter)
, since no
class needs to be specified, but that also means the return type
is less specific (it is always DrawableInterface
).filter
- The search criteria.getDrawable(ObjectdrawFilter)
,
getAllDrawablesMatching(ObjectdrawFilter)
protected objectdraw.DrawingCanvas getCanvas()
JDrawingCanvas
object associated
with the WindowController
being tested.