|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectTestCase
NameTest
public class NameTest
Tests generic name and related objects from the org.opengis.util
package. Name instances are created using a NameFactory given at construction time.
In order to specify their factory and run the tests in a JUnit framework, implementors can define a subclass as below:
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.opengis.test.util.NameTest;
@RunWith(JUnit4.class)
public class MyTest extends NameTest {
public MyTest() {
super(new MyNameFactory());
}
}
Alternatively this test class can also be used directly in the TestSuite,
which combine every tests defined in the GeoAPI conformance module.
TestSuite| Field Summary | |
|---|---|
protected NameFactory |
factory
The factory to be used for testing generic name instances, or null if none. |
protected boolean |
isMixedNameSyntaxSupported
true if the GenericName implementations created by the factory
can use different syntax rules in different part of their name. |
protected boolean |
isMultiLocaleSupported
true if the InternationalString implementations created by the
factory can support more than one locale. |
| Fields inherited from class TestCase |
|---|
configurationTip, listener, NO_FACTORY, validators |
| Constructor Summary | |
|---|---|
NameTest(NameFactory factory)
Creates a new test using the given factory. |
|
| Method Summary | |
|---|---|
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. |
void |
testInternationalString()
Tests the creation of "My documents" folder name. |
void |
testLocalName()
Tests the creation of "EPSG:4326" as local names. |
void |
testParsedHTTP()
Tests the parsing of "http://www.opengis.net/gml/srs/epsg.xml#4326" as a local name. |
void |
testParsedURN()
Tests the parsing of "urn:ogc:def:crs:epsg:4326" as a scoped name. |
void |
testScopedName()
Tests the creation of "urn:ogc:def:crs:epsg:4326" as a scoped name. |
| Methods inherited from class TestCase |
|---|
addTestListener, factories, factories, getEnabledFlags, removeTestListener |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final NameFactory factory
null if none.
protected boolean isMultiLocaleSupported
true if the InternationalString implementations created by the
factory can support more than one locale. If
false, then the factory method may retain only one locale among the set
of user-provided localized strings.
protected boolean isMixedNameSyntaxSupported
true if the GenericName implementations 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 (e.g. ":", ".",
"/" and "#" in "http://www.opengis.net/gml/srs/epsg.xml#4326") are
supported. If false, then only a single rule can be applied to the name as a whole
(e.g. only the ":" separator is used in "urn:ogc:def:crs:epsg:4326").
| Constructor Detail |
|---|
public NameTest(NameFactory factory)
null,
then the tests will be skipped.
factory - The factory to be used for creation of instances to be tested.| Method Detail |
|---|
public static List<Factory[]> factories()
TestCase.factories(Class[]) javadoc.
NameTest constructor.public Configuration configuration()
Configuration.Key of the same name:
configuration in class TestCaseImplementationDetails.configuration(Factory[])public void testInternationalString()
public void testLocalName()
"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:
public void testScopedName()
"urn:ogc:def:crs:epsg:4326" as a scoped name.
This test uses the following factory methods:
public void testParsedURN()
"urn:ogc:def:crs:epsg:4326" as a scoped name.
This test uses the following factory methods:
NameFactory.createLocalName(NameSpace, CharSequence)NameFactory.createNameSpace(GenericName, Map)NameFactory.parseGenericName(NameSpace, CharSequence)
public void testParsedHTTP()
"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)
This tests is executed only if isMixedNameSyntaxSupported is true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||