Package org.opengis.test
Interface ImplementationDetails
-
public interface ImplementationDetails
Provides optional information about the implementation being tested. Implementors can provide an instance of this interface in their test packages and declare their instance in theMETA-INF/services/org.opengis.test.ImplementationDetails
file. GeoAPI will iterate over everyImplementationDetails
found on the classpath when needed:- Before each execution of a configurable
TestCase
, in order to check which tests (if any) should be disabled. - Before each execution of a
TestCase
performing numerical calculation, in order to determine if a specific implementation needs to relax the tolerance threshold.
ImplementationDetails
is registered, then GeoAPI assumes that all tests are enabled with their default tolerance threshold. This is equivalent to using anImplementationDetails
instance where every methods returnnull
.- Since:
- 3.1
- Before each execution of a configurable
-
-
Method Summary
Modifier and Type Method Description Configuration
configuration(Factory... factories)
Returns the set of tests that should be disabled, ornull
if none.ToleranceModifier
tolerance(MathTransform transform)
Returns an object for modifying the tolerance thresholds when testing the given math transform, ornull
if no change is needed.
-
-
-
Method Detail
-
configuration
Configuration configuration(Factory... factories)
Returns the set of tests that should be disabled, ornull
if none. If non-null, then the returned map can contain someConfiguration.Key
associated to theBoolean.FALSE
value. Example:
If more than one@Override public Configuration configuration(Factory... factories) { Configuration config = new Configuration(); config.unsupported(Configuration.Key.isDerivativeSupported, Configuration.Key.isNonSquareMatrixSupported); return config; }
ImplementationDetails
is found on the classpath, then a logicalAND
is performed on the boolean values returned by allImplementationDetails.configuration(…)
calls.This method is invoked often (typically one or two time before every single test method), so implementors may want to cache their configuration map.
- Parameters:
factories
- the factories to be tested.- Returns:
- the collection of tests to disable for the given factories, or
null
if none. - See Also:
TestCase.configuration()
-
tolerance
ToleranceModifier tolerance(MathTransform transform)
Returns an object for modifying the tolerance thresholds when testing the given math transform, ornull
if no change is needed. This method should return a non-null value only if the implementation being tested does not have the accuracy expected by theTestCase
. In such case, the object returned by this method can be used for relaxing the tolerance threshold.If more than one
ImplementationDetails
return a non-null value, then the threshold used by GeoAPI will be the maximal value returned by allToleranceModifier
objects.- Parameters:
transform
- the transform being tested.- Returns:
- an object for modifying the tolerance thresholds, or
null
if no change is needed.
-
-