use of net.opengis.swes.x20.InsertSensorDocument in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldEncodeProcedureDescriptionFormat.
@Test
public void shouldEncodeProcedureDescriptionFormat() throws EncodingException {
XmlObject xmlObject = encoder.create(request);
Assert.assertThat(xmlObject, CoreMatchers.instanceOf(InsertSensorDocument.class));
Assert.assertThat(((InsertSensorDocument) xmlObject).getInsertSensor().getProcedureDescriptionFormat(), Is.is(SensorML20Constants.SENSORML_20_OUTPUT_FORMAT_URL));
}
use of net.opengis.swes.x20.InsertSensorDocument in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldEncodeSosInsertionMetadata.
@Test
public void shouldEncodeSosInsertionMetadata() throws EncodingException {
InsertSensorDocument isd = (InsertSensorDocument) encoder.create(request);
Assert.assertThat(isd.getInsertSensor().getMetadataArray().length, Is.is(1));
Assert.assertThat(isd.getInsertSensor().getMetadataArray(0).getInsertionMetadata(), CoreMatchers.instanceOf(SosInsertionMetadataType.class));
SosInsertionMetadataType insertionMetadata = (SosInsertionMetadataType) isd.getInsertSensor().getMetadataArray(0).getInsertionMetadata();
Assert.assertThat(insertionMetadata.getFeatureOfInterestTypeArray(), CoreMatchers.notNullValue());
List<String> foiTypes = Arrays.asList(insertionMetadata.getFeatureOfInterestTypeArray());
Assert.assertThat(foiTypes, Matchers.hasSize(2));
Assert.assertThat(foiTypes, Matchers.containsInAnyOrder("test-foi-type-1", "test-foi-type-2"));
Assert.assertThat(insertionMetadata.getObservationTypeArray(), CoreMatchers.notNullValue());
List<String> oTypes = Arrays.asList(insertionMetadata.getObservationTypeArray());
Assert.assertThat(oTypes, Matchers.hasSize(2));
Assert.assertThat(oTypes, Matchers.containsInAnyOrder("test-observation-type-1", "test-observation-type-2"));
}
Aggregations