use of com.github.sebastianfrey.joa.resources.request.FeatureQueryRequest in project joa by sebastianfrey.
the class GeoPackageServiceTest method should_return_items_from_collection.
@Test
public void should_return_items_from_collection() throws Exception {
FeatureQueryRequest query = new FeatureQueryRequest().offset(Long.valueOf(0)).limit(10).datetime(new Datetime("2021-03-04T17:44:25.873Z")).bbox(new Bbox().minX(-180.0).minY(-90.0).maxX(80.0).maxY(90.0));
GeoPackageItems items = geoPackageService.getItems(TEST_SERVICE, TEST_COLLECTION_POINT, query);
assertThat(items).isNotNull();
assertThat(items.getServiceId()).isEqualTo("example");
assertThat(items.getCollectionId()).isEqualTo("point1");
assertThat(items.getFeatures()).isNotEmpty();
assertThat(items.getNumberMatched()).isGreaterThan(Long.valueOf(0));
assertThat(items.getNumberReturned()).isGreaterThan(0);
assertThatCode(() -> Instant.parse(items.getTimeStamp())).doesNotThrowAnyException();
}
Aggregations