use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldEncodeResultEncoding.
@Test
public void shouldEncodeResultEncoding() throws EncodingException, DecodingException {
ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
XmlHelper.validateDocument(template);
Assert.assertThat(template.getResultEncoding(), Matchers.notNullValue());
Assert.assertThat(template.getResultEncoding().getAbstractEncoding(), Matchers.notNullValue());
AbstractEncodingType resultEncoding = template.getResultEncoding().getAbstractEncoding();
Assert.assertThat(resultEncoding, Matchers.instanceOf(TextEncodingType.class));
TextEncodingType xbTextEncoding = (TextEncodingType) resultEncoding;
Assert.assertThat(xbTextEncoding.getBlockSeparator(), Is.is(blockSeparator));
Assert.assertThat(xbTextEncoding.getTokenSeparator(), Is.is(tokenSeparator));
}
use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldSetObservationTemplate.
@Test
public void shouldSetObservationTemplate() throws EncodingException {
ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
Assert.assertThat(template.getObservationTemplate(), Matchers.notNullValue());
}
use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldSetOffering.
@Test
public void shouldSetOffering() throws EncodingException {
ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
Assert.assertThat(template.getOffering(), Matchers.notNullValue());
Assert.assertThat(template.getOffering(), Is.is(offering));
}
use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldSetOptionalIdentifier.
@Test
public void shouldSetOptionalIdentifier() throws EncodingException {
ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
Assert.assertThat(template.isSetIdentifier(), Is.is(true));
Assert.assertThat(template.getIdentifier(), Is.is(templateIdentifier));
}
Aggregations