use of org.folio.rest.support.TextResponse in project mod-circulation-storage by folio-org.
the class PatronActionSessionAPITest method cannotDeleteNonExistentPatronActionSessionId.
@Test
public void cannotDeleteNonExistentPatronActionSessionId() throws MalformedURLException, InterruptedException, ExecutionException, TimeoutException {
TextResponse textResponse = assertRecordClient.attemptDeleteById(UUID.randomUUID());
assertThat(textResponse.getStatusCode(), is(404));
assertThat(textResponse.getBody(), is("Not found"));
}
use of org.folio.rest.support.TextResponse in project mod-circulation-storage by folio-org.
the class LoansAnonymizationApiTest method anonymizeLoansFor.
private void anonymizeLoansFor(UUID userId) throws MalformedURLException, InterruptedException, ExecutionException, TimeoutException {
final CompletableFuture<TextResponse> postCompleted = new CompletableFuture<>();
client.post(loanStorageUrl("/anonymize/" + userId), StorageTestSuite.TENANT_ID, ResponseHandler.text(postCompleted));
final TextResponse postResponse = postCompleted.get(5, TimeUnit.SECONDS);
assertThat(postResponse, isNoContent());
}
use of org.folio.rest.support.TextResponse in project mod-circulation-storage by folio-org.
the class AssertingRecordClient method deleteById.
public void deleteById(UUID id) throws MalformedURLException, InterruptedException, ExecutionException, TimeoutException {
TextResponse deleteResponse = attemptDeleteById(id);
assertThat("Failed to delete record", deleteResponse, isNoContent());
}
Aggregations