/** * Tests the {@link DefaultVerticalDatum#getVerticalDatumType()} method in a state * simulating unmarshalling of GML 3.2 document. * * @throws NoSuchFieldException Should never happen. * @throws IllegalAccessException Should never happen. */ @Test public void testAfterUnmarshal() throws NoSuchFieldException, IllegalAccessException { final Field typeField = DefaultVerticalDatum.class.getDeclaredField("type"); typeField.setAccessible(true); assertEquals(VerticalDatumType .GEOIDAL, typeForName(typeField, "Geoidal height")); assertEquals(VerticalDatumType .DEPTH, typeForName(typeField, "Some depth measurement")); assertEquals(VerticalDatumTypes.ELLIPSOIDAL, typeForName(typeField, "Ellipsoidal height")); assertEquals(VerticalDatumType .OTHER_SURFACE, typeForName(typeField, "NotADepth")); }