Class 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
    • Method Detail

      • runSuite

        public void runSuite()
        runSuite()
        Specified by:
        runSuite in class TestSuite
      • 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