use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.
the class SwesExtensionsTest method containsExtension_for_string_created_with_enum_schould_return_true.
@Test
public void containsExtension_for_string_created_with_enum_schould_return_true() {
final Extensions extensions = new Extensions();
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.
the class SwesExtensionsTest method getExtension_for_enum_schould_return_true.
@Test
public void getExtension_for_enum_schould_return_true() {
final Extensions extensions = new Extensions();
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(VALUE_1));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(VALUE_2));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(VALUE_3));
assertThat(extensions.getExtension(DEFINITION_1).orElse(null).getValue(), instanceOf(VALUE_1.getClass()));
assertThat(extensions.getExtension(DEFINITION_2).orElse(null).getValue(), instanceOf(VALUE_2.getClass()));
assertThat(extensions.getExtension(DEFINITION_3).orElse(null).getValue(), instanceOf(VALUE_3.getClass()));
}
use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.
the class SwesExtensionsTest method containsExtension_for_string_schould_return_true.
@Test
public void containsExtension_for_string_schould_return_true() {
final Extensions extensions = new Extensions();
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.
the class SwesExtensionsTest method getExtension_for_string_schould_return_true.
@Test
public void getExtension_for_string_schould_return_true() {
final Extensions extensions = new Extensions();
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(VALUE_1));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(VALUE_2));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(VALUE_3));
assertThat(extensions.getExtension(DEFINITION_1).orElse(null).getValue(), instanceOf(VALUE_1.getClass()));
assertThat(extensions.getExtension(DEFINITION_2).orElse(null).getValue(), instanceOf(VALUE_2.getClass()));
assertThat(extensions.getExtension(DEFINITION_3).orElse(null).getValue(), instanceOf(VALUE_3.getClass()));
}
use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.
the class SwesExtensionsTest method containsExtension_for_enum_created_with_string_schould_return_true.
@Test
public void containsExtension_for_enum_created_with_string_schould_return_true() {
final Extensions extensions = new Extensions();
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
Aggregations