use of org.apache.sis.referencing.datum.AbstractDatum in project sis by apache.
the class AbstractIdentifiedObjectTest method testAsSubtype.
/**
* Tests {@link AbstractIdentifiedObject#getIdentifier()} with a sub-type of {@code AbstractIdentifiedObject}.
* The use of a subtype will allow {@code getIdentifier()} to build a URN and {@code getId()} to know what to
* insert between {@code "epsg-"} and the code.
*/
@Test
@DependsOnMethod("testWithManyIdentifiers")
public void testAsSubtype() {
final ReferenceIdentifier identifier = new NamedIdentifier(EPSG, "7019");
final Set<ReferenceIdentifier> identifiers = Collections.singleton(identifier);
final AbstractIdentifiedObject object = new AbstractDatum(properties(identifiers));
final ReferenceIdentifier gmlId = validate(object, identifiers, "epsg-datum-7019");
assertNotNull("gmlId", gmlId);
assertEquals("gmlId.codespace", "EPSG", gmlId.getCodeSpace());
assertEquals("gmlId.code", "7019", gmlId.getCode());
}
Aggregations