Package diva.canvas.test
Class FigureTest
- java.lang.Object
-
- diva.util.jester.TestSuite
-
- diva.canvas.test.FigureTest
-
public class FigureTest extends TestSuite
A test suite for Figure. Since Figure is an interface, this class has no main() method. It defines a factory interface that concrete factories must implement.- Version:
- $Id$
- Author:
- John Reekie
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FigureTest.FigureFactory
The figure factory interfaceclass
FigureTest.RegionTestCase
Region testing test case.
-
Constructor Summary
Constructors Constructor Description FigureTest(TestHarness harness, FigureTest.FigureFactory factory)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
runSuite()
runSuite()void
testHit()
Test hit.void
testIntersects()
Test intersection.void
testPaint()
Test painting.void
testProperties()
Perform the simple set/get tests.void
testTransform()
Test how transforms affect the figurevoid
testTranslate()
Test how translates affect the figure-
Methods inherited from class diva.util.jester.TestSuite
getFactory, getTestHarness, run, runAll, runTestCase, setFactory, setTestHarness
-
-
-
-
Constructor Detail
-
FigureTest
public FigureTest(TestHarness harness, FigureTest.FigureFactory factory)
Constructor
-
-
Method Detail
-
testProperties
public void testProperties()
Perform the simple set/get tests.
-
testHit
public void testHit()
Test hit. This doesn't actually do a hit test, but it does check that the passed rectangle is not modified.
-
testIntersects
public void testIntersects()
Test intersection. This doesn't actually do an intersection test, but it does check that the passed rectangle is not modified.
-
testPaint
public void testPaint()
Test painting. This method calls both versions of the paint method. It doesn't actually test what the paint method does. In either case, it verifies that the transform context of the Graphics2D is not changed. In the case of the paint method that takes a region, it also verifies that the region is not changed by the call. Note that we transform the figure first as this is sometimes needed to make this bug show up.
-
testTransform
public void testTransform()
Test how transforms affect the figure
-
testTranslate
public void testTranslate()
Test how translates affect the figure
-
-