use of org.osate.aadl2.ReferenceType in project arctic-sea by 52North.
the class WmlTVPEncoderv20Test method shouldEncodeInterpolationTypeContinuousAsDefault.
@Test
public void shouldEncodeInterpolationTypeContinuousAsDefault() throws EncodingException, XmlException {
XmlObject encodedElement = encoder.encode(mv);
TVPDefaultMetadataPropertyType defaultPointMetadata = ((MeasurementTimeseriesDocument) encodedElement).getTimeseries().getDefaultPointMetadataArray(0);
DefaultTVPMeasurementMetadataDocument tvpMeasurementMetadataDocument = DefaultTVPMeasurementMetadataDocument.Factory.parse(defaultPointMetadata.xmlText());
ReferenceType interpolationType = tvpMeasurementMetadataDocument.getDefaultTVPMeasurementMetadata().getInterpolationType();
assertThat(interpolationType.getHref(), Is.is(WaterMLConstants.InterpolationType.Continuous.getIdentifier()));
assertThat(interpolationType.getTitle(), Is.is(WaterMLConstants.InterpolationType.Continuous.getTitle()));
}
Aggregations