The GeoAPI conformance module provides two kind of Java classes:
For example an implementor can test the validity of his Coordinate Reference System objects and related objects in a test suite like below:
import org.junit.*;
import static org.opengis.test.Validators.*;
public class MyTests {
@Test
public void testMyCRS() {
CoordinateReferenceSystem crs = ...
validate(crs);
MathTransform transform = ...
validate(transform);
}
}
Validators are thread-safe except for the configuration phase (which is optional and usually executed only once before the tests begin). They test the logical consistency of their argument. For example if given a chain of concatenated transforms, validate(object) will ensure that the source dimension of a transformation step is equals to the target dimension of the previous step. Dependencies are traversed recursively, for example validating a CoordinateReferenceSystem object implies validating its CoordinateSystem and Datum attributes.