diva.canvas.test
Class FigureTest.RegionTestCase

java.lang.Object
  extended by diva.util.jester.TestCase
      extended by diva.canvas.test.FigureTest.RegionTestCase
Enclosing class:
FigureTest

public abstract class FigureTest.RegionTestCase
extends TestCase

Region testing test case. This test case can be used for methods that take a region argument, to verify that they don't change that region. The run method must be overridden.


Field Summary
(package private)  java.awt.geom.Rectangle2D copy
           
(package private)  Figure figure
           
(package private)  java.awt.geom.Rectangle2D region
           
 
Constructor Summary
FigureTest.RegionTestCase(java.lang.String str)
           
 
Method Summary
 void check()
          Report on the results of running the test.
 void init()
          Initialize the test case.
 
Methods inherited from class diva.util.jester.TestCase
assertEquals, assertExpr, fail, getExecutionTime, getName, run, startTimer, stopTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

figure

Figure figure

region

java.awt.geom.Rectangle2D region

copy

java.awt.geom.Rectangle2D copy
Constructor Detail

FigureTest.RegionTestCase

public FigureTest.RegionTestCase(java.lang.String str)
Method Detail

init

public void init()
          throws java.lang.Exception
Description copied from class: TestCase
Initialize the test case. This is a concrete method that does nothing. It is not requires that this method be overridden, but any test that is more than a few lines should do so to distinguish between the initialization and execution phases of the test. It also allows local classes to be created that override init() to create an object or set of objects that will be used in multiple tests.

Overrides:
init in class TestCase
Throws:
java.lang.Exception

check

public void check()
           throws TestFailedException
Description copied from class: TestCase
Report on the results of running the test. This method should perform a series of checks on the data produced by the run() method, and for each, call fail() if the produced data does not conform to the expected result.

Specified by:
check in class TestCase
Throws:
TestFailedException