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 NameFactoryThe factory to be used for testing generic name instances, ornullif none. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNameTest(NameFactory factory) Creates a new test using the given factory. -
Method Summary
Modifier and TypeMethodDescriptionprivate NameSpacecreateNameSpace(GenericName name, String headSeparator, String separator) Creates a namespace having the given name and separator.voidTests the creation of "My documents" folder name.voidTests the creation of"EPSG:4326"as local names.voidTests the parsing of"http://www.opengis.net/gml/srs/epsg.xml#4326"as a local name.voidTests the parsing of"urn:ogc:def:crs:epsg:4326"as a scoped name.voidTests 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, ornullif 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 using.(null, parsedNames)invalid reference
createGenericName
headSeparator- The separator to insert between the namespace and the. For HTTP namespace, it isinvalid reference
head
"://". For URN namespace, it is typically":".separator- The separator to insert betweenin that namespace. For HTTP namespace, it isinvalid 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:
-