Object
TestCase
ReferencingTestCase
ObjectFactoryTest
- Direct Known Subclasses:
ReferencingTest
Tests the creation of referencing objects from the object factories
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.opengis.test.referencing.ObjectFactoryTest;
public class MyTest extends ObjectFactoryTest {
public MyTest() {
super(new MyDatumFactory(), new MyCSFactory(), new MyCRSFactory(), new MyOpFactory());
}
}
- Since:
- 2.3
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CoordinateOperationFactory
Factory to use for buildingConversion
instances, ornull
if none.protected final CRSFactory
Factory to use for buildingCoordinateReferenceSystem
instances, ornull
if none.protected final CSFactory
Factory to use for buildingCoordinateSystem
instances, ornull
if none.protected final DatumFactory
Factory to use for buildingDatum
instances, ornull
if none.Fields inherited from class org.opengis.test.TestCase
configurationTip, units, validators
-
Constructor Summary
ConstructorDescriptionObjectFactoryTest
(DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, CoordinateOperationFactory copFactory) Creates a new test using the given factories. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Tests the creation of a geocentric CRS.void
Deprecated, for removal: This API element is subject to removal in a future version.void
Tests the creation of a compound CRS made of a projected CRS with a gravity-related height.void
Tests the creation of the EPSG:4326GeographicCRS
.void
Tests the creation of the WGS84 CRS with ellipsoidal height, and verifies that the axes are in the given (latitude, longitude, height) order.Methods inherited from class org.opengis.test.referencing.ReferencingTestCase
verifyCoordinateSystem, verifyFlattenedSphere, verifyGeographicExtent, verifyIdentification, verifyParameter, verifyPrimeMeridian, verifyTimeExtent, verifyVerticalExtent
Methods inherited from class org.opengis.test.TestCase
configuration, getEnabledFlags
-
Field Details
-
datumFactory
Factory to use for buildingDatum
instances, ornull
if none. -
csFactory
Factory to use for buildingCoordinateSystem
instances, ornull
if none. -
crsFactory
Factory to use for buildingCoordinateReferenceSystem
instances, ornull
if none. -
copFactory
Factory to use for buildingConversion
instances, ornull
if none.
-
-
Constructor Details
-
ObjectFactoryTest
public ObjectFactoryTest(DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, CoordinateOperationFactory copFactory) Creates a new test using the given factories. If a given factory isnull
, then the tests which depend on it will be skipped.- Parameters:
datumFactory
- factory for creatingDatum
instances.csFactory
- factory for creatingCoordinateSystem
instances.crsFactory
- factory for creatingCoordinateReferenceSystem
instances.copFactory
- factory for creatingConversion
instances.
-
-
Method Details
-
testWGS84
Tests the creation of the EPSG:4326GeographicCRS
. This method wraps the object factories in anPseudoEpsgFactory
instance, then delegates to theAuthorityFactoryTest.testWGS84()
method.- Throws:
FactoryException
- if a factory fails to create a referencing object.
-
testWGS84_3D
Tests the creation of the WGS84 CRS with ellipsoidal height, and verifies that the axes are in the given (latitude, longitude, height) order.- Throws:
FactoryException
- if a factory fails to create a referencing object.
-
testGeocentric
Tests the creation of a geocentric CRS.- Throws:
FactoryException
- if a factory fails to create a referencing object.
-
testProjected3D
@Test @Deprecated(since="3.1", forRemoval=true) public void testProjected3D() throws FactoryExceptionDeprecated, for removal: This API element is subject to removal in a future version.RenamedtestProjectedWithGeoidalHeight()
for making clearer that this is not a projected CRS associated to a 3D coordinate system.Tests the creation of a projected CRS with vertical height.- Throws:
FactoryException
- if a factory fails to create a referencing object.
-
testProjectedWithGeoidalHeight
Tests the creation of a compound CRS made of a projected CRS with a gravity-related height.- Throws:
FactoryException
- if a factory fails to create a referencing object.
-
testProjectedWithGeoidalHeight()
for making clearer that this is not a projected CRS associated to a 3D coordinate system.