Class TransformTestCase

Object
TestCase
TransformTestCase
Direct Known Subclasses:
AffineTransformTest, ParameterizedTransformTest

public abstract class TransformTestCase extends TestCase
Base class for MathTransform implementation tests. Subclasses shall assign a value to the transform field before to invoke any method in this class. The specified math transform shall support the following mandatory operations: All other operations are optional. However subclasses shall declare which methods, if any, are unsupported. By default every operations are assumed supported. Tests can be disabled on a case-by-case basis by setting the appropriate is<Operation>Supported fields to false.

After TransformTestCase has been setup, subclasses can invoke any of the verify methods in their JUnit test methods. Callers must supply the input coordinate points to be used for testing purpose, since the range of valid values is usually transform-dependent.

Some general rules:

  • Coordinate values, or information used for computing coordinate values, are always specified as arguments to the verify methods. Everything else are fields in the TransformTestCase object.
  • The methods in this class do not validate the transform. It is caller responsibility to validate the transform if wanted.
  • Unless otherwise indicated, every verify methods are independent. For example, invoking verifyConsistency(float[]) does not imply a call to verifyInverse(float[]) or verifyDerivative(double[]). The later methods must be invoked explicitly if wanted.
Since:
2.2