use of org.folio.rest.acq.model.finance.Encumbrance.Status.UNRELEASED in project mod-invoice by folio-org.
the class InvoiceCancelServiceTest method setupEncumbrancePut.
private void setupEncumbrancePut(Transaction transaction) {
RequestEntry requestEntry = new RequestEntry("/finance/encumbrances/{id}").withPathParameter("id", transaction.getId());
Transaction updatedTransaction = JsonObject.mapFrom(transaction).mapTo(Transaction.class);
updatedTransaction.getEncumbrance().setStatus(UNRELEASED);
doReturn(completedFuture(null)).when(restClient).put(argThat(re -> sameRequestEntry(requestEntry, re)), eq(updatedTransaction), eq(requestContextMock));
}
use of org.folio.rest.acq.model.finance.Encumbrance.Status.UNRELEASED in project mod-invoice by folio-org.
the class InvoiceCancelServiceTest method setupEncumbrancePutWithError.
private void setupEncumbrancePutWithError(Transaction transaction) {
RequestEntry requestEntry = new RequestEntry("/finance/encumbrances/{id}").withPathParameter("id", transaction.getId());
Transaction updatedTransaction = JsonObject.mapFrom(transaction).mapTo(Transaction.class);
updatedTransaction.getEncumbrance().setStatus(UNRELEASED);
HttpException ex = new HttpException(500, "Error test");
doReturn(failedFuture(ex)).when(restClient).put(argThat(re -> sameRequestEntry(requestEntry, re)), eq(updatedTransaction), eq(requestContextMock));
}
Aggregations