use of org.n52.shetland.ogc.swe.simpleType.SweQuality in project arctic-sea by 52North.
the class SweCommonEncoderv101Test method should_encode_count_with_quality_text.
@Test
public void should_encode_count_with_quality_text() throws EncodingException {
final String qualityTextValue = "quality-text-value";
final SweCount sosCount = (SweCount) new SweCount().setQuality(Lists.newArrayList((SweQuality) new SweText().setValue(qualityTextValue)));
final XmlObject encode = sweCommonEncoderv101.encode(sosCount);
assertThat(encode, instanceOf(Count.class));
final Count xbCount = (Count) encode;
assertThat(xbCount.getQualityArray(), is(not(nullValue())));
assertThat(xbCount.getQualityArray().length, is(1));
assertThat(xbCount.getQualityArray(0).isSetText(), is(true));
assertThat(xbCount.getQualityArray(0).getText().getValue(), is(qualityTextValue));
}
Aggregations