use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldThrowExceptionIfVersionIsMissing.
@Test
public void shouldThrowExceptionIfVersionIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertSensorRequestEncoder.class.getSimpleName() + " can not encode 'missing version'"));
encoder.create(new InsertSensorRequest("service", ""));
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldThrowExceptionWhenProcedureDescriptionFormatIsMissing.
@Test
public void shouldThrowExceptionWhenProcedureDescriptionFormatIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertSensorRequestEncoder.class.getSimpleName() + " can not encode 'procedure description format missing'"));
encoder.create(new InsertSensorRequest("service", "version"));
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldThrowExceptionIfServiceIsMissing.
@Test
public void shouldThrowExceptionIfServiceIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertSensorRequestEncoder.class.getSimpleName() + " can not encode 'missing service'"));
encoder.create(new InsertSensorRequest());
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertSensorRequestEncoderTest method shouldThrowExceptionWhenObservablePropertyIsMissing.
@Test
public void shouldThrowExceptionWhenObservablePropertyIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertSensorRequestEncoder.class.getSimpleName() + " can not encode 'observed property missing'"));
InsertSensorRequest request = new InsertSensorRequest("service", "version");
request.setProcedureDescriptionFormat("test-format");
request.setProcedureDescription(createProcedureDescription());
encoder.create(request);
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class OmEncoderv20Test method shouldThrowExceptionWhenReceivedInvalidObservationTypeInObservationTemplate.
@Test
public void shouldThrowExceptionWhenReceivedInvalidObservationTypeInObservationTemplate() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + OmEncoderv20.class.getSimpleName() + " can not encode 'missing type in OM_Observation'"));
omEncoderv20.encode(new OmObservationConstellation());
}
Aggregations