Package org.opengis.test.util
Class NameTest
java.lang.Object
org.opengis.test.TestCase
org.opengis.test.util.NameTest
Tests generic name and related objects from the
org.opengis.util
package. Name instances are created using a NameFactory
given at construction time.- Since:
- 2.2
- Version:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NameFactory
The factory to be used for testing generic name instances, ornull
if none. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NameTest
(NameFactory factory) Creates a new test using the given factory. -
Method Summary
Modifier and TypeMethodDescriptionprivate NameSpace
createNameSpace
(GenericName name, String headSeparator, String separator) Creates a namespace having the given name and separator.void
Tests the creation of "My documents" folder name.void
Tests the creation of"EPSG:4326"
as local names.void
Tests the parsing of"http://www.opengis.net/gml/srs/epsg.xml#4326"
as a local name.void
Tests the parsing of"urn:ogc:def:crs:epsg:4326"
as a scoped name.void
Tests the creation of"urn:ogc:def:crs:epsg:4326"
as a scoped name.
-
Field Details
-
factory
The factory to be used for testing generic name instances, ornull
if none.
-
-
Constructor Details
-
NameTest
Creates a new test using the given factory. If the given factory isnull
, then the tests will be skipped.- Parameters:
factory
- The factory to be used for creation of instances to be tested.
-
-
Method Details
-
createNameSpace
Creates a namespace having the given name and separator.- Parameters:
name
- The name of the namespace to be returned. This argument can be created usinginvalid reference
createGenericName
headSeparator
- The separator to insert between the namespace and theinvalid reference
head
"://"
. For URN namespace, it is typically":"
.separator
- The separator to insert betweeninvalid reference
parsed names
"."
. For URN namespace, it is typically":"
.- Returns:
- A namespace having the given name and separator.
-
testInternationalString
public void testInternationalString()Tests the creation of "My documents" folder name. This test uses the following factory methods: -
testLocalName
public void testLocalName()Tests the creation of"EPSG:4326"
as local names. First the"EPSG"
namespace is created. Then a"4326"
local name is created in that namespace. This test uses the following factory methods: -
testScopedName
public void testScopedName()Tests the creation of"urn:ogc:def:crs:epsg:4326"
as a scoped name. This test uses the following factory methods: -
testParsedURN
public void testParsedURN()Tests the parsing of"urn:ogc:def:crs:epsg:4326"
as a scoped name. This test uses the following factory methods: -
testParsedHTTP
public void testParsedHTTP()Tests the parsing of"http://www.opengis.net/gml/srs/epsg.xml#4326"
as a local name. This test uses the following factory methods:
-