org.opengis.test
Interface ImplementationDetails

Show UML class diagram

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 the META-INF/services/org.opengis.test.ImplementationDetails file. GeoAPI will iterate over every ImplementationDetails found on the classpath when needed:

If no instance of ImplementationDetails is registered, then GeoAPI assumes that all tests are enabled with their default tolerance threshold. This is equivalent to using an ImplementationDetails instance where every methods return null.

Since:
3.1

Method Summary
 Configuration configuration(Factory... factories)
          Returns the set of tests that should be disabled, or null if none.
 ToleranceModifier tolerance(MathTransform transform)
          Returns an object for modifying the tolerance thresholds when testing the given math transform, or null if no change is needed.
 

Method Detail

configuration

Configuration configuration(Factory... factories)
Returns the set of tests that should be disabled, or null if none. If non-null, then the returned map can contain some Configuration.Key associated to the Boolean.FALSE value. Example:
@Override
public Configuration configuration(Factory... factories) {
    Configuration config = new Configuration();
    config.unsupported(Configuration.Key.isDerivativeSupported, Configuration.Key.isNonSquareMatrixSupported);
    return config;
}
If more than one ImplementationDetails is found on the classpath, then a logical AND is performed on the boolean values returned by all ImplementationDetails.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, or null 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 the TestCase. 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 all ToleranceModifier objects.

Parameters:
transform - The transform being tested.
Returns:
An object for modifying the tolerance thresholds, or null if no change is needed.


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.