Search in sources :

Example 6 with BooleanType

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));
}
Also used : BooleanType(net.opengis.swe.x20.BooleanType) SweBoolean(org.n52.shetland.ogc.swe.simpleType.SweBoolean) Test(org.junit.Test)

Aggregations

BooleanType (net.opengis.swe.x20.BooleanType)6 BooleanPropertyType (net.opengis.swe.x20.BooleanPropertyType)3 CategoryType (net.opengis.swe.x20.CategoryType)3 CountRangeType (net.opengis.swe.x20.CountRangeType)3 CountType (net.opengis.swe.x20.CountType)3 DataArrayType (net.opengis.swe.x20.DataArrayType)3 DataRecordType (net.opengis.swe.x20.DataRecordType)3 QuantityRangeType (net.opengis.swe.x20.QuantityRangeType)3 QuantityType (net.opengis.swe.x20.QuantityType)3 TextType (net.opengis.swe.x20.TextType)3 TimeRangeType (net.opengis.swe.x20.TimeRangeType)3 TimeType (net.opengis.swe.x20.TimeType)3 VectorType (net.opengis.swe.x20.VectorType)3 CategoryRangeType (net.opengis.swe.x20.CategoryRangeType)2 DataArrayDocument (net.opengis.swe.x20.DataArrayDocument)2 DataChoiceType (net.opengis.swe.x20.DataChoiceType)2 DataRecordDocument (net.opengis.swe.x20.DataRecordDocument)2 MatrixType (net.opengis.swe.x20.MatrixType)2 Test (org.junit.Test)2 SweBoolean (org.n52.shetland.ogc.swe.simpleType.SweBoolean)2