Tests generic name and related objects from the
org.opengis.util package.
Name instances are created using a NameFactory 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.util.NameTest;
public class MyTest extends NameTest {
public MyTest() {
super(new MyNameFactory());
}
}
- Since:
- 2.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NameFactoryThe factory to be used for testing generic name instances, ornullif none.protected booleantrueif theGenericNameimplementations created by the factory can use different syntax rules in different part of their name.protected booleantrueif theInternationalStringimplementations created by the factory can support more than one locale.Fields inherited from class org.opengis.test.TestCase
configurationTip, units, validators -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns information about the configuration of the test which has been run.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.Methods inherited from class org.opengis.test.TestCase
getEnabledFlags
-
Field Details
-
factory
The factory to be used for testing generic name instances, ornullif none. -
isMultiLocaleSupported
trueif theInternationalStringimplementations created by the factory can support more than one locale. Iffalse, then the factory method may retain only one locale among the set of user-provided localized strings. -
isMixedNameSyntaxSupported
trueif theGenericNameimplementations created by the factory can use different syntax rules in different part of their name.- If
true, then URI using different separators in different parts of their name are supported.Example:":",".","/"and"#"in"http://www.opengis.net/gml/srs/epsg.xml#4326". - If
false, then only a single rule can be applied to the name as a whole.Example: only the":"separator is used in"urn:ogc:def:crs:epsg:4326".
- If
-
-
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
-
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.Keyof the same name:
- Overrides:
configurationin classTestCase- Returns:
- the configuration of the test being run, or an empty map if none. This method returns a modifiable map in order to allow subclasses to modify it.
- All the following values associated to the
-
testInternationalString
Tests the creation of "My documents" folder name. This test uses the following factory methods: -
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
Tests the creation of"urn:ogc:def:crs:epsg:4326"as a scoped name. This test uses the following factory methods: -
testParsedURN
Tests the parsing of"urn:ogc:def:crs:epsg:4326"as a scoped name. This test uses the following factory methods: -
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:NameFactory.createLocalName(NameSpace, CharSequence)NameFactory.createNameSpace(GenericName, Map)NameFactory.parseGenericName(NameSpace, CharSequence)
isMixedNameSyntaxSupportedistrue.
-