@Deprecated public class CRSTest extends ReferencingTestCase
Deprecated.
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;

@RunWith(JUnit4.class)
public class MyTest extends CRSTest {
    public MyTest() {
        super(new MyCRSAuthorityFactory());
    }
}
Since:
2.3
  • Field Details

  • Constructor Details

    • CRSTest

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

    • factories

      public static List<Factory[]> factories()
      Deprecated.
      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.
      Returns:
      the default set of arguments to be given to the CRSTest constructor.
      Since:
      3.1
    • testCRSAuthorityCreation

      public void testCRSAuthorityCreation() throws NoSuchAuthorityCodeException, FactoryException
      Deprecated.
      Tests the creation of the WGS84 crs from the EPSG code.
      Throws:
      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.