Class UserObjectFactoryTestCase<T>
- Object
-
- TestCase
-
- ReferencingTestCase
-
- UserObjectFactoryTestCase<T>
-
- Type Parameters:
T
- The type of objects to test.
public abstract class UserObjectFactoryTestCase<T> extends ReferencingTestCase
Base class for tests of new CRS definitions (3000 series). The test procedures in this series are designed to evaluate the software’s capabilities for adding user-defined CRS and transformation definitions.- Since:
- 3.1
- See Also:
TestSuite
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isFactoryPreservingUserValues
Whether the objects created by the testedObjectFactory
use the specified values as-is.Map<String,Object>
properties
The properties to be given in argument to aObjectFactory.createXXX(String)
method.-
Fields inherited from class TestCase
configurationTip, listener, units, validators
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserObjectFactoryTestCase(ObjectFactory... factories)
Creates a new test which will use the given factories to execute.
-
Method Summary
Modifier and Type Method Description Configuration
configuration()
Returns information about the configuration of the test which has been run.abstract T
getIdentifiedObject()
Returns the instance to be tested.-
Methods inherited from class ReferencingTestCase
verifyCoordinateSystem, verifyFlattenedSphere, verifyGeographicExtent, verifyIdentification, verifyParameter, verifyPrimeMeridian, verifyTimeExtent, verifyVerticalExtent
-
Methods inherited from class TestCase
factories, factories, getEnabledFlags
-
-
-
-
Field Detail
-
properties
public final Map<String,Object> properties
The properties to be given in argument to aObjectFactory.createXXX(String)
method. This map contains at least the given entries:- A
String
value associated to the "name" key. - An
Identifier
value associated to the "identifiers" key.
- A
-
isFactoryPreservingUserValues
protected boolean isFactoryPreservingUserValues
Whether the objects created by the testedObjectFactory
use the specified values as-is. This flag should be set tofalse
if the factory performs any of the following operations:- Convert numerical values from user-provided linear units to metres.
- Convert numerical values from user-provided angular units to degrees.
- Change ellipsoid second defining parameter (e.g. from semi-major axis length to an equivalent inverse flattening factor).
- Change map projection parameters (e.g. from standard parallel to an equivalent scale factor).
- Any other change that preserve numeric equivalence.
true
.
-
-
Constructor Detail
-
UserObjectFactoryTestCase
protected UserObjectFactoryTestCase(ObjectFactory... factories)
Creates a new test which will use the given factories to execute.- Parameters:
factories
- the factories to be used by the test. Those factories passed verbatim to the super-class constructor.
-
-
Method Detail
-
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:isFactoryPreservingUserValues
- The factories used by the test (provided by subclasses)
- Overrides:
configuration
in classTestCase
- Returns:
- the configuration of the test being run.
- See Also:
ImplementationDetails.configuration(Factory[])
- All the following values associated to the
-
getIdentifiedObject
public abstract T getIdentifiedObject() throws FactoryException
Returns the instance to be tested. When this method is invoked for the first time, it creates the instance to test by invoking acreateXXX(String)
method from the user-specifiedObjectFactory
with the currentproperties
in argument. The created object is then cached and returned in subsequent invocations of this method.- Returns:
- the instance to test.
- Throws:
FactoryException
- if an error occurred while creating the identified object.
-
-