use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertResultRequestEncoderTest method shouldThrowExceptionIfResultValuesAreMissing.
@Test
public void shouldThrowExceptionIfResultValuesAreMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertResultRequestEncoder.class.getSimpleName() + " can not encode 'missing resultValues'"));
InsertResultRequest request = new InsertResultRequest("service", "version");
request.setTemplateIdentifier("templateIdentifier");
encoder.create(request);
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertResultRequestEncoderTest method shouldThrowExceptionIfServiceIsMissing.
@Test
public void shouldThrowExceptionIfServiceIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertResultRequestEncoder.class.getSimpleName() + " can not encode 'missing service'"));
encoder.create(new InsertResultRequest());
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldThrowExceptionIfServiceIsMissing.
@Test
public void shouldThrowExceptionIfServiceIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertResultTemplateRequestEncoder.class.getSimpleName() + " can not encode 'missing service'"));
encoder.create(new InsertResultTemplateRequest());
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldThrowExceptionWhenOfferingIsMissing.
@Test
public void shouldThrowExceptionWhenOfferingIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertResultTemplateRequestEncoder.class.getSimpleName() + " can not encode 'missing offering'"));
request = new InsertResultTemplateRequest("service", "version");
request.setObservationTemplate(new OmObservationConstellation());
encoder.create(request);
}
use of org.n52.svalbard.encode.Encoder in project arctic-sea by 52North.
the class InsertResultTemplateRequestEncoderTest method shouldThrowExceptionIfVersionIsMissing.
@Test
public void shouldThrowExceptionIfVersionIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + InsertResultTemplateRequestEncoder.class.getSimpleName() + " can not encode 'missing version'"));
encoder.create(new InsertResultTemplateRequest("service", ""));
}
Aggregations