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
FieldsModifier and TypeFieldDescriptionprotected final CoordinateOperationFactoryFactory to use for buildingConversioninstances, ornullif none.protected final CRSFactoryFactory to use for buildingCoordinateReferenceSysteminstances, ornullif none.protected final CSFactoryFactory to use for buildingCoordinateSysteminstances, ornullif none.protected final DatumFactoryFactory to use for buildingDatuminstances, ornullif none.Fields inherited from class org.opengis.test.TestCase
configurationTip, units, validators -
Constructor Summary
ConstructorsConstructorDescriptionObjectFactoryTest(DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, CoordinateOperationFactory copFactory) Creates a new test using the given factories. -
Method Summary
Modifier and TypeMethodDescriptionvoidTests the creation of a geocentric CRS.voidDeprecated, for removal: This API element is subject to removal in a future version.voidTests the creation of a compound CRS made of a projected CRS with a gravity-related height.voidTests the creation of the EPSG:4326GeographicCRS.voidTests 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, verifyVerticalExtentMethods inherited from class org.opengis.test.TestCase
configuration, getEnabledFlags
-
Field Details
-
datumFactory
Factory to use for buildingDatuminstances, ornullif none. -
csFactory
Factory to use for buildingCoordinateSysteminstances, ornullif none. -
crsFactory
Factory to use for buildingCoordinateReferenceSysteminstances, ornullif none. -
copFactory
Factory to use for buildingConversioninstances, ornullif 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 creatingDatuminstances.csFactory- factory for creatingCoordinateSysteminstances.crsFactory- factory for creatingCoordinateReferenceSysteminstances.copFactory- factory for creatingConversioninstances.
-
-
Method Details
-
testWGS84
Tests the creation of the EPSG:4326GeographicCRS. This method wraps the object factories in anPseudoEpsgFactoryinstance, 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.