Class GIGS3003
-
public class GIGS3003 extends UserObjectFactoryTestCase<PrimeMeridian>
Verifies that the software allows correct definition of a user-defined prime meridian.Test method: Create user-defined prime meridian for each of several different prime meridians. Test data: GIGS_3003_userPrimeMeridian.csv
.Tested API: DatumFactory.createPrimeMeridian(Map, double, Unit)
.Expected result: The software should accept the test data. The properties of the created objects will be compared with the properties given to the factory method. Usage example: in order to specify their factories and run the tests in a JUnit framework, implementors 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.gigs.GIGS3003; @RunWith(JUnit4.class) public class MyTest extends GIGS3003 { public MyTest() { super(new MyDatumFactory()); } }
- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description Unit<Angle>
angularUnit
The unit of measurement ofgreenwichLongitude
.protected DatumFactory
datumFactory
Factory to use for buildingPrimeMeridian
instances, ornull
if none.double
greenwichLongitude
The prime meridian Greenwich longitude, in unit ofangularUnit
.-
Fields inherited from class UserObjectFactoryTestCase
isFactoryPreservingUserValues, properties
-
Fields inherited from class TestCase
configurationTip, listener, units, validators
-
-
Constructor Summary
Constructors Constructor Description GIGS3003(DatumFactory datumFactory)
Creates a new test using the given factory.
-
Method Summary
Modifier and Type Method Description Configuration
configuration()
Returns information about the configuration of the test which has been run.static List<Factory[]>
factories()
Returns a default set of factories to use for running the tests.PrimeMeridian
getIdentifiedObject()
Returns the prime meridian instance to be tested.void
testBogota()
Tests “GIGS PM I” prime meridian creation from the factory.void
testGreenwich()
Tests “GIGS PM A” prime meridian creation from the factory.void
testJakarta()
Tests “GIGS PM D” prime meridian creation from the factory.void
testParis()
Tests “GIGS PM H” prime meridian creation from the factory.-
Methods inherited from class ReferencingTestCase
verifyCoordinateSystem, verifyFlattenedSphere, verifyGeographicExtent, verifyIdentification, verifyParameter, verifyPrimeMeridian, verifyTimeExtent, verifyVerticalExtent
-
Methods inherited from class TestCase
factories, factories, getEnabledFlags
-
-
-
-
Field Detail
-
greenwichLongitude
public double greenwichLongitude
The prime meridian Greenwich longitude, in unit ofangularUnit
.
-
angularUnit
public Unit<Angle> angularUnit
The unit of measurement ofgreenwichLongitude
.
-
datumFactory
protected final DatumFactory datumFactory
Factory to use for buildingPrimeMeridian
instances, ornull
if none. This is the factory used by thegetIdentifiedObject()
method.
-
-
Constructor Detail
-
GIGS3003
public GIGS3003(DatumFactory datumFactory)
Creates a new test using the given factory. If a given factory isnull
, then the tests which depend on it will be skipped.- Parameters:
datumFactory
- factory for creatingPrimeMeridian
instances.
-
-
Method Detail
-
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 than subclassed by the implementor. The factories are fetched as documented in theTestCase.factories(Class[])
javadoc.- Returns:
- the default set of arguments to be given to the
GIGS3003
constructor.
-
configuration
public Configuration configuration()
Returns information about the configuration of the test which has been run. This method returns a map containing:- All the following values associated to the
Configuration.Key
of the same name:
- Overrides:
configuration
in classUserObjectFactoryTestCase<PrimeMeridian>
- Returns:
- the configuration of the test being run.
- See Also:
ImplementationDetails.configuration(Factory[])
- All the following values associated to the
-
getIdentifiedObject
public PrimeMeridian getIdentifiedObject() throws FactoryException
Returns the prime meridian instance to be tested. When this method is invoked for the first time, it creates the prime meridian to test by invoking the corresponding method fromDatumFactory
with the currentproperties
map in argument. The created object is then cached and returned in all subsequent invocations of this method.- Specified by:
getIdentifiedObject
in classUserObjectFactoryTestCase<PrimeMeridian>
- Returns:
- the prime meridian instance to test.
- Throws:
FactoryException
- if an error occurred while creating the prime meridian instance.
-
testGreenwich
public void testGreenwich() throws FactoryException
Tests “GIGS PM A” prime meridian creation from the factory.- GIGS prime meridian code: 68901
- GIGS prime meridian name: GIGS PM A
- EPSG equivalence: 8901 – Greenwich
- Greenwich longitude: 0°
- Throws:
FactoryException
- if an error occurred while creating the prime meridian from the properties.- See Also:
GIGS2003.testGreenwich()
-
testJakarta
public void testJakarta() throws FactoryException
Tests “GIGS PM D” prime meridian creation from the factory.- GIGS prime meridian code: 68908
- GIGS prime meridian name: GIGS PM D
- EPSG equivalence: 8908 – Jakarta
- Greenwich longitude: 106°48'27.79° (106.80771944444444°)
- Throws:
FactoryException
- if an error occurred while creating the prime meridian from the properties.- See Also:
GIGS2003.testJakarta()
-
testParis
public void testParis() throws FactoryException
Tests “GIGS PM H” prime meridian creation from the factory.- GIGS prime meridian code: 68903
- GIGS prime meridian name: GIGS PM H
- EPSG equivalence: 8903 – Paris
- Greenwich longitude: 2.5969213 grad (2.33722917°)
- Specific usage / Remarks: Equivalent to 2°20'14.025.
- Throws:
FactoryException
- if an error occurred while creating the prime meridian from the properties.- See Also:
GIGS2003.testParis()
-
testBogota
public void testBogota() throws FactoryException
Tests “GIGS PM I” prime meridian creation from the factory.- GIGS prime meridian code: 68904
- GIGS prime meridian name: GIGS PM I
- EPSG equivalence: 8904 – Bogota
- Greenwich longitude: -74°04'51.3° (74.08091666666667°)
- Throws:
FactoryException
- if an error occurred while creating the prime meridian from the properties.- See Also:
GIGS2003.testBogota()
-
-