use of net.opengis.swe.x20.BooleanType in project arctic-sea by 52North.
the class SweCommonDecoderV20Test method should_encode_xbBoolean_into_SosSweBoolean_with_correct_value_and_definition.
@Test
public void should_encode_xbBoolean_into_SosSweBoolean_with_correct_value_and_definition() throws DecodingException {
BooleanType xbBoolean = BooleanType.Factory.newInstance();
final boolean value = true;
xbBoolean.setValue(value);
xbBoolean.setDefinition(definition);
Object decodedObject = decoder.decode(xbBoolean);
assertThat(decodedObject.getClass().getName(), is(SweBoolean.class.getName()));
SweBoolean sosBoolean = (SweBoolean) decodedObject;
assertThat(sosBoolean.getValue(), is(value));
assertThat(sosBoolean.getDefinition(), is(definition));
}
Aggregations