use of io.lumeer.api.dto.JsonDocument in project engine by Lumeer.
the class DocumentServiceIT method testGetAllDocuments.
@Test
@Ignore("Works manually but there is unexpected exception in tests")
public void testGetAllDocuments() {
String id1 = createDocument().getId();
String id2 = createDocument().getId();
Response response = client.target(DOCUMENTS_URL_PREFIX).path(collection.getId()).path("documents").request(MediaType.APPLICATION_JSON).buildGet().invoke();
assertThat(response).isNotNull();
assertThat(response.getStatusInfo()).isEqualTo(Response.Status.OK);
List<JsonDocument> documents = response.readEntity(new GenericType<List<JsonDocument>>() {
});
assertThat(documents).extracting(Document::getId).containsOnly(id1, id2);
}
Aggregations