@Deprecated public class CRSTest extends ReferencingTestCase
Tests CoordinateReferenceSystem and related objects from the org.opengis.referencing.crs package. CRS instances are created using the authority factory given at construction time.

Usage example:

in order to specify their factories and run the tests in a JUnit framework, implementers can define a subclass in their own test suite as in the example below:
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.opengis.test.referencing.CRSTest;

public class MyTest extends CRSTest {
    public MyTest() {
        super(new MyCRSAuthorityFactory());
  • Field Details

  • Constructor Details

    • CRSTest

      public CRSTest(CRSAuthorityFactory factory)
      Creates a new test using the given factory. If the given factory is null, then the tests will be skipped.
      factory - factory for creating CoordinateReferenceSystem instances.
  • Method Details

    • factories

      public static List<Factory[]> factories()
      Returns a default set of factories to use for running the tests. Those factories are given in arguments to the constructor when this test class is instantiated directly by JUnit (for example as a suite element), instead of subclassed by the implementer. The factories are fetched as documented in the TestCase.factories(Class[]) javadoc.
      the default set of arguments to be given to the CRSTest constructor.
    • testCRSAuthorityCreation

      public void testCRSAuthorityCreation() throws NoSuchAuthorityCodeException, FactoryException
      Tests the creation of the WGS84 crs from the EPSG code.
      NoSuchAuthorityCodeException - if the specified code is not found among the ones present in the database.
      FactoryException - if the creation of the CoordinateReferenceSystem failed for another reason.