Search in sources :

Example 1 with TransactionCollection

use of org.folio.rest.acq.model.finance.TransactionCollection in project mod-invoice by folio-org.

the class BaseTransactionServiceTest method testShouldSuccessRetrieveExistedTransactions.

@Test
public void testShouldSuccessRetrieveExistedTransactions() throws Exception {
    // given
    BaseTransactionService service = spy(new BaseTransactionService(restClient));
    JsonObject encumbranceList = new JsonObject(getMockData(MOCK_ENCUMBRANCES_LIST));
    List<Transaction> encumbrances = encumbranceList.getJsonArray("transactions").stream().map(obj -> ((JsonObject) obj).mapTo(Transaction.class)).collect(toList());
    TransactionCollection trCollection = new TransactionCollection().withTransactions(encumbrances);
    RequestContext requestContext = new RequestContext(ctxMock, okapiHeaders);
    doReturn(completedFuture(trCollection)).when(restClient).get(any(RequestEntry.class), any(RequestContext.class), eq(TransactionCollection.class));
    // When
    List<String> transactionIds = encumbrances.stream().map(Transaction::getId).collect(toList());
    List<Transaction> actEncumbrances = service.getTransactions(transactionIds, requestContext).join();
    // Then
    assertThat(actEncumbrances, hasSize(1));
    assertThat(actEncumbrances.get(0).getId(), equalTo(encumbrances.get(0).getId()));
    verify(restClient).get(any(RequestEntry.class), any(RequestContext.class), eq(TransactionCollection.class));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) RestClient(org.folio.rest.core.RestClient) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) Header(io.restassured.http.Header) OKAPI_HEADER_TENANT(org.folio.rest.RestVerticle.OKAPI_HEADER_TENANT) HashMap(java.util.HashMap) Mockito.spy(org.mockito.Mockito.spy) Transaction(org.folio.rest.acq.model.finance.Transaction) TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) ArrayList(java.util.ArrayList) MockitoAnnotations(org.mockito.MockitoAnnotations) Times(org.mockito.internal.verification.Times) Map(java.util.Map) RequestContext(org.folio.rest.core.models.RequestContext) Matchers.hasSize(org.hamcrest.Matchers.hasSize) JsonObject(io.vertx.core.json.JsonObject) OKAPI_URL(org.folio.rest.RestConstants.OKAPI_URL) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Mockito.doReturn(org.mockito.Mockito.doReturn) RequestEntry(org.folio.rest.core.models.RequestEntry) MOCK_ENCUMBRANCES_LIST(org.folio.TestMockDataConstants.MOCK_ENCUMBRANCES_LIST) ApiTestBase(org.folio.rest.impl.ApiTestBase) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) EventLoopContext(io.vertx.core.impl.EventLoopContext) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) Transaction(org.folio.rest.acq.model.finance.Transaction) JsonObject(io.vertx.core.json.JsonObject) RequestContext(org.folio.rest.core.models.RequestContext) RequestEntry(org.folio.rest.core.models.RequestEntry) Test(org.junit.jupiter.api.Test)

Example 2 with TransactionCollection

use of org.folio.rest.acq.model.finance.TransactionCollection in project mod-invoice by folio-org.

the class InvoiceCancelServiceTest method setupGetTransactions.

private void setupGetTransactions(Invoice invoice) throws IOException {
    TransactionCollection creditCollection = getMockAs(MOCK_CREDITS_LIST, TransactionCollection.class);
    TransactionCollection encumbranceCollection = getMockAs(MOCK_ENCUMBRANCES_LIST, TransactionCollection.class);
    TransactionCollection paymentCollection = getMockAs(MOCK_PAYMENTS_LIST, TransactionCollection.class);
    TransactionCollection pendingPaymentCollection = getMockAs(MOCK_PENDING_PAYMENTS_LIST, TransactionCollection.class);
    TransactionCollection trCollection = mergeCollections(List.of(creditCollection, encumbranceCollection, paymentCollection, pendingPaymentCollection));
    String query = String.format("sourceInvoiceId==%s", invoice.getId());
    RequestEntry requestEntry = new RequestEntry(TRANSACTIONS_ENDPOINT).withQuery(query).withLimit(Integer.MAX_VALUE).withOffset(0);
    doReturn(completedFuture(trCollection)).when(restClient).get(argThat(re -> sameRequestEntry(requestEntry, re)), eq(requestContextMock), eq(TransactionCollection.class));
}
Also used : INVOICE_MOCK_DATA_PATH(org.folio.TestMockDataConstants.INVOICE_MOCK_DATA_PATH) BeforeEach(org.junit.jupiter.api.BeforeEach) TransactionType(org.folio.rest.acq.model.finance.Transaction.TransactionType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) PurchaseOrder(org.folio.rest.acq.model.orders.PurchaseOrder) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) PoLine(org.folio.rest.acq.model.orders.PoLine) OrderLineService(org.folio.services.order.OrderLineService) VOUCHERS_STORAGE(org.folio.invoices.utils.ResourcePathResolver.VOUCHERS_STORAGE) INVOICE_TRANSACTION_SUMMARIES(org.folio.invoices.utils.ResourcePathResolver.INVOICE_TRANSACTION_SUMMARIES) Mockito.argThat(org.mockito.Mockito.argThat) TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) MOCK_CREDITS_LIST(org.folio.TestMockDataConstants.MOCK_CREDITS_LIST) Collections.singletonList(java.util.Collections.singletonList) VOUCHER_MOCK_DATA_PATH(org.folio.TestMockDataConstants.VOUCHER_MOCK_DATA_PATH) HttpException(org.folio.invoices.rest.exceptions.HttpException) Voucher(org.folio.rest.jaxrs.model.Voucher) InvoiceTransactionSummaryService(org.folio.services.finance.transaction.InvoiceTransactionSummaryService) VoucherCommandService(org.folio.services.voucher.VoucherCommandService) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) InvoiceTransactionSummary(org.folio.rest.acq.model.finance.InvoiceTransactionSummary) JsonObject(io.vertx.core.json.JsonObject) Method(java.lang.reflect.Method) ERROR_UNRELEASING_ENCUMBRANCES(org.folio.invoices.utils.ErrorCodes.ERROR_UNRELEASING_ENCUMBRANCES) Mockito.doReturn(org.mockito.Mockito.doReturn) RELEASED(org.folio.rest.acq.model.finance.Encumbrance.Status.RELEASED) InvoiceLine(org.folio.rest.jaxrs.model.InvoiceLine) ORDER_TRANSACTION_SUMMARIES(org.folio.invoices.utils.ResourcePathResolver.ORDER_TRANSACTION_SUMMARIES) CompletionException(java.util.concurrent.CompletionException) MOCK_ENCUMBRANCES_LIST(org.folio.TestMockDataConstants.MOCK_ENCUMBRANCES_LIST) UUID(java.util.UUID) Collectors.joining(java.util.stream.Collectors.joining) Test(org.junit.jupiter.api.Test) CompletableFuture.failedFuture(java.util.concurrent.CompletableFuture.failedFuture) List(java.util.List) FINANCE_TRANSACTIONS(org.folio.invoices.utils.ResourcePathResolver.FINANCE_TRANSACTIONS) PENDING(org.folio.rest.acq.model.finance.Encumbrance.Status.PENDING) PurchaseOrderCollection(org.folio.rest.acq.model.orders.PurchaseOrderCollection) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) UNRELEASED(org.folio.rest.acq.model.finance.Encumbrance.Status.UNRELEASED) WorkflowStatus(org.folio.rest.acq.model.orders.PurchaseOrder.WorkflowStatus) Invoice(org.folio.rest.jaxrs.model.Invoice) MOCK_PAYMENTS_LIST(org.folio.TestMockDataConstants.MOCK_PAYMENTS_LIST) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) RestClient(org.folio.rest.core.RestClient) EncumbranceService(org.folio.services.finance.transaction.EncumbranceService) CANNOT_CANCEL_INVOICE(org.folio.invoices.utils.ErrorCodes.CANNOT_CANCEL_INVOICE) PoLineCollection(org.folio.rest.acq.model.orders.PoLineCollection) CompletableFuture(java.util.concurrent.CompletableFuture) Transaction(org.folio.rest.acq.model.finance.Transaction) VoucherCollection(org.folio.rest.jaxrs.model.VoucherCollection) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) Answer(org.mockito.stubbing.Answer) OrderTransactionSummary(org.folio.rest.acq.model.finance.OrderTransactionSummary) InvocationOnMock(org.mockito.invocation.InvocationOnMock) RequestContext(org.folio.rest.core.models.RequestContext) Encumbrance(org.folio.rest.acq.model.finance.Encumbrance) BaseTransactionService(org.folio.services.finance.transaction.BaseTransactionService) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MOCK_PENDING_PAYMENTS_LIST(org.folio.TestMockDataConstants.MOCK_PENDING_PAYMENTS_LIST) OrderService(org.folio.services.order.OrderService) ResourcePathResolver.resourcesPath(org.folio.invoices.utils.ResourcePathResolver.resourcesPath) Files(java.nio.file.Files) VoucherRetrieveService(org.folio.services.voucher.VoucherRetrieveService) Vertx(io.vertx.core.Vertx) RequestEntry(org.folio.rest.core.models.RequestEntry) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Mockito.verify(org.mockito.Mockito.verify) Mockito(org.mockito.Mockito) Collectors.toList(java.util.stream.Collectors.toList) Paths(java.nio.file.Paths) INVOICE_LINES_LIST_PATH(org.folio.TestMockDataConstants.INVOICE_LINES_LIST_PATH) OrderTransactionSummaryService(org.folio.services.finance.transaction.OrderTransactionSummaryService) TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) RequestEntry(org.folio.rest.core.models.RequestEntry)

Example 3 with TransactionCollection

use of org.folio.rest.acq.model.finance.TransactionCollection in project mod-invoice by folio-org.

the class InvoiceCancelServiceTest method mergeCollections.

private TransactionCollection mergeCollections(List<TransactionCollection> collections) {
    TransactionCollection newCollection = new TransactionCollection();
    int total = 0;
    for (TransactionCollection c : collections) {
        newCollection.getTransactions().addAll(c.getTransactions());
        total += c.getTotalRecords();
    }
    newCollection.setTotalRecords(total);
    return newCollection;
}
Also used : TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection)

Example 4 with TransactionCollection

use of org.folio.rest.acq.model.finance.TransactionCollection in project mod-invoice by folio-org.

the class MockServer method handleGetFinanceTransactions.

private void handleGetFinanceTransactions(RoutingContext ctx) {
    logger.info("handleGetFinanceTransactions got: " + ctx.request().path());
    String query = StringUtils.trimToEmpty(ctx.request().getParam("query"));
    if (query.contains(BAD_QUERY)) {
        serverResponse(ctx, 400, APPLICATION_JSON, Response.Status.BAD_REQUEST.getReasonPhrase());
    } else {
        List<Transaction> transactions = getMockEntries(FINANCE_TRANSACTIONS, Transaction.class).orElse(Collections.emptyList());
        TransactionCollection transactionCollection = new TransactionCollection().withTransactions(transactions);
        JsonObject data = JsonObject.mapFrom(transactionCollection.withTotalRecords(transactions.size()));
        addServerRqRsData(HttpMethod.GET, FINANCE_TRANSACTIONS, data);
        serverResponse(ctx, 200, APPLICATION_JSON, data.encodePrettily());
    }
}
Also used : TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) Transaction(org.folio.rest.acq.model.finance.Transaction) JsonObject(io.vertx.core.json.JsonObject)

Example 5 with TransactionCollection

use of org.folio.rest.acq.model.finance.TransactionCollection in project mod-orders by folio-org.

the class OrderRolloverServiceTest method shouldUpdateOrderLinesCostAndEncumbranceLinksAndPolCurrencyVsSystemCurrencyTheSame.

@Test
@DisplayName("Should update order lines cost And Encumbrance Links where Pol Currency equals systemCurrency")
void shouldUpdateOrderLinesCostAndEncumbranceLinksAndPolCurrencyVsSystemCurrencyTheSame() {
    String fromFiscalYearId = UUID.randomUUID().toString();
    String ledgerId = UUID.randomUUID().toString();
    String toFiscalYearId = UUID.randomUUID().toString();
    String fundId1 = UUID.randomUUID().toString();
    String fundId2 = UUID.randomUUID().toString();
    String fundId3 = UUID.randomUUID().toString();
    String orderId1 = UUID.randomUUID().toString();
    String orderId2 = UUID.randomUUID().toString();
    String orderId3 = UUID.randomUUID().toString();
    String poLineId1 = UUID.randomUUID().toString();
    String poLineId2 = UUID.randomUUID().toString();
    String poLineId3 = UUID.randomUUID().toString();
    String prevEncumbrId1 = UUID.randomUUID().toString();
    String prevEncumbrId2 = UUID.randomUUID().toString();
    String prevEncumbrId3 = UUID.randomUUID().toString();
    String currEncumbrId1 = UUID.randomUUID().toString();
    String currEncumbrId2 = UUID.randomUUID().toString();
    String currEncumbrId3 = UUID.randomUUID().toString();
    String expClassId2 = UUID.randomUUID().toString();
    String expClassId3 = UUID.randomUUID().toString();
    EncumbranceRollover ongoingEncumbranceBasedOnExpended = new EncumbranceRollover().withOrderType(EncumbranceRollover.OrderType.ONGOING).withBasedOn(EncumbranceRollover.BasedOn.EXPENDED);
    EncumbranceRollover oneTimeEncumbrance = new EncumbranceRollover().withOrderType(EncumbranceRollover.OrderType.ONE_TIME).withBasedOn(EncumbranceRollover.BasedOn.REMAINING);
    EncumbranceRollover ongoingEncumbranceBasedOnInitialAmount = new EncumbranceRollover().withOrderType(EncumbranceRollover.OrderType.ONGOING).withBasedOn(EncumbranceRollover.BasedOn.INITIAL_AMOUNT);
    LedgerFiscalYearRollover ledgerFiscalYearRollover = new LedgerFiscalYearRollover().withId(UUID.randomUUID().toString()).withFromFiscalYearId(fromFiscalYearId).withLedgerId(ledgerId).withToFiscalYearId(toFiscalYearId).withEncumbrancesRollover(List.of(ongoingEncumbranceBasedOnExpended, oneTimeEncumbrance, ongoingEncumbranceBasedOnInitialAmount));
    List<Fund> funds = List.of(new Fund().withId(fundId1).withLedgerId(ledgerId), new Fund().withId(fundId2).withLedgerId(ledgerId), new Fund().withId(fundId3).withLedgerId(ledgerId));
    PurchaseOrder purchaseOrder1 = new PurchaseOrder().withId(orderId1).withWorkflowStatus(PurchaseOrder.WorkflowStatus.OPEN);
    PurchaseOrder purchaseOrder2 = new PurchaseOrder().withId(orderId2).withWorkflowStatus(PurchaseOrder.WorkflowStatus.OPEN);
    PurchaseOrder purchaseOrder3 = new PurchaseOrder().withId(orderId3).withWorkflowStatus(PurchaseOrder.WorkflowStatus.OPEN);
    List<PurchaseOrder> orders = List.of(purchaseOrder1, purchaseOrder2, purchaseOrder3);
    PurchaseOrderCollection purchaseOrderCollection = new PurchaseOrderCollection().withPurchaseOrders(orders).withTotalRecords(3);
    FundDistribution fundDistributionOneTime = new FundDistribution().withFundId(fundId1).withValue(100d).withEncumbrance(prevEncumbrId1);
    FundDistribution fundDistributionOngoing2 = new FundDistribution().withFundId(fundId2).withValue(100d).withEncumbrance(prevEncumbrId2).withExpenseClassId(expClassId2);
    FundDistribution fundDistributionOngoing3 = new FundDistribution().withFundId(fundId3).withValue(100d).withEncumbrance(prevEncumbrId3).withExpenseClassId(expClassId3);
    Cost costOneTime = new Cost().withListUnitPrice(100d).withQuantityPhysical(1).withCurrency("USD").withPoLineEstimatedPrice(100d);
    PoLine poLineOneTime = new PoLine().withId(poLineId1).withPurchaseOrderId(orderId1).withCost(costOneTime).withFundDistribution(List.of(fundDistributionOneTime));
    Cost costOngoing2 = new Cost().withListUnitPrice(100d).withQuantityPhysical(1).withCurrency("USD").withPoLineEstimatedPrice(100d);
    PoLine poLineOngoing2 = new PoLine().withId(poLineId2).withPurchaseOrderId(orderId2).withCost(costOngoing2).withFundDistribution(List.of(fundDistributionOngoing2));
    Cost costOngoing3 = new Cost().withListUnitPrice(100d).withQuantityPhysical(1).withCurrency("USD").withPoLineEstimatedPrice(100d);
    PoLine poLineOngoing3 = new PoLine().withId(poLineId3).withPurchaseOrderId(orderId3).withCost(costOngoing3).withFundDistribution(List.of(fundDistributionOngoing3));
    List<PoLine> poLines = List.of(poLineOneTime, poLineOngoing2, poLineOngoing3);
    doReturn(completedFuture(funds)).when(fundService).getFundsByLedgerId(ledgerId, requestContext);
    doReturn(completedFuture(purchaseOrderCollection)).when(purchaseOrderStorageService).getPurchaseOrders(anyString(), anyInt(), anyInt(), any());
    doReturn(completedFuture(poLines)).when(purchaseOrderLineService).getOrderLines(anyString(), anyInt(), anyInt(), any());
    doReturn(completedFuture(null)).when(purchaseOrderLineService).saveOrderLines(eq(poLines), any());
    Encumbrance encumbranceOneTime = new Encumbrance().withSourcePurchaseOrderId(orderId1).withSourcePoLineId(poLineId1).withOrderType(Encumbrance.OrderType.ONE_TIME).withInitialAmountEncumbered(60d);
    Transaction transactionOneTime = new Transaction().withId(currEncumbrId1).withFromFundId(fundId1).withEncumbrance(encumbranceOneTime);
    Encumbrance encumbranceOngoing2 = new Encumbrance().withSourcePurchaseOrderId(orderId2).withSourcePoLineId(poLineId2).withOrderType(Encumbrance.OrderType.ONGOING).withInitialAmountEncumbered(90d);
    Transaction transactionOngoing2 = new Transaction().withId(currEncumbrId2).withFromFundId(fundId2).withEncumbrance(encumbranceOngoing2).withExpenseClassId(expClassId2);
    Encumbrance encumbranceOngoing3 = new Encumbrance().withSourcePurchaseOrderId(orderId3).withSourcePoLineId(poLineId3).withOrderType(Encumbrance.OrderType.ONGOING).withInitialAmountEncumbered(95d);
    Transaction transactionOngoing3 = new Transaction().withId(currEncumbrId3).withFromFundId(fundId3).withEncumbrance(encumbranceOngoing3).withExpenseClassId(expClassId3);
    List<Transaction> encumbrances = List.of(transactionOneTime, transactionOngoing2, transactionOngoing3);
    TransactionCollection encumbranceCollection = new TransactionCollection().withTransactions(encumbrances).withTotalRecords(3);
    doReturn(completedFuture(encumbranceCollection)).when(transactionService).getTransactions(anyString(), anyInt(), anyInt(), any());
    double exchangeEurToUsdRate = 1.0d;
    doReturn(completedFuture(systemCurrency)).when(configurationEntriesService).getSystemCurrency(requestContext);
    String polCurrency = systemCurrency;
    ConversionQuery actQuery = ConversionQueryBuilder.of().setBaseCurrency(polCurrency).setTermCurrency(systemCurrency).set(RATE_KEY, exchangeEurToUsdRate).build();
    ExchangeRateProvider exchangeRateProvider = Mockito.mock(ManualExchangeRateProvider.class);
    ManualCurrencyConversion manualCurrencyConversion = new ManualCurrencyConversion(actQuery, exchangeRateProvider, ConversionContext.of());
    ExchangeRate exchangeRate = mock(ExchangeRate.class);
    doReturn(exchangeRateProvider).when(exchangeRateProviderResolver).resolve(any(ConversionQuery.class), eq(requestContext));
    doReturn(manualCurrencyConversion).when(exchangeRateProvider).getCurrencyConversion(any(ConversionQuery.class));
    doReturn(exchangeRate).when(exchangeRateProvider).getExchangeRate(any(ConversionQuery.class));
    when(exchangeRate.getContext()).thenReturn(ConversionContext.of());
    when(exchangeRate.getCurrency()).thenReturn(Monetary.getCurrency(systemCurrency));
    when(exchangeRate.getBaseCurrency()).thenReturn(Monetary.getCurrency(polCurrency));
    when(exchangeRate.getFactor()).thenReturn(new DefaultNumberValue(exchangeEurToUsdRate));
    CompletableFuture<Void> future = orderRolloverService.rollover(ledgerFiscalYearRollover, requestContext);
    future.join();
    assertFalse(future.isCompletedExceptionally());
    assertThat(fundDistributionOneTime.getEncumbrance(), equalTo(currEncumbrId1));
    assertThat(fundDistributionOngoing2.getEncumbrance(), equalTo(currEncumbrId2));
    assertThat(fundDistributionOngoing3.getEncumbrance(), equalTo(currEncumbrId3));
    assertThat(costOneTime.getPoLineEstimatedPrice(), equalTo(60d));
    assertThat(costOngoing2.getPoLineEstimatedPrice(), equalTo(90d));
    assertThat(costOngoing3.getPoLineEstimatedPrice(), equalTo(95d));
    assertThat(costOneTime.getFyroAdjustmentAmount(), equalTo(-40d));
    assertThat(costOngoing2.getFyroAdjustmentAmount(), equalTo(-10d));
    assertThat(costOngoing3.getFyroAdjustmentAmount(), equalTo(-5d));
}
Also used : EncumbranceRollover(org.folio.rest.jaxrs.model.EncumbranceRollover) DefaultNumberValue(org.javamoney.moneta.spi.DefaultNumberValue) TransactionCollection(org.folio.rest.acq.model.finance.TransactionCollection) ExchangeRate(javax.money.convert.ExchangeRate) PurchaseOrderCollection(org.folio.rest.jaxrs.model.PurchaseOrderCollection) ExchangeRateProvider(javax.money.convert.ExchangeRateProvider) ManualExchangeRateProvider(org.folio.service.exchange.ManualExchangeRateProvider) Fund(org.folio.rest.acq.model.finance.Fund) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) LedgerFiscalYearRollover(org.folio.rest.jaxrs.model.LedgerFiscalYearRollover) Cost(org.folio.rest.jaxrs.model.Cost) ManualCurrencyConversion(org.folio.service.exchange.ManualCurrencyConversion) FundDistribution(org.folio.rest.jaxrs.model.FundDistribution) ConversionQuery(javax.money.convert.ConversionQuery) Transaction(org.folio.rest.acq.model.finance.Transaction) PoLine(org.folio.rest.jaxrs.model.PoLine) Encumbrance(org.folio.rest.acq.model.finance.Encumbrance) PurchaseOrder(org.folio.rest.jaxrs.model.PurchaseOrder) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

TransactionCollection (org.folio.rest.acq.model.finance.TransactionCollection)21 Transaction (org.folio.rest.acq.model.finance.Transaction)18 Test (org.junit.jupiter.api.Test)17 Encumbrance (org.folio.rest.acq.model.finance.Encumbrance)15 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)11 CompositePoLine (org.folio.rest.jaxrs.model.CompositePoLine)9 FundDistribution (org.folio.rest.jaxrs.model.FundDistribution)9 CompositePurchaseOrder (org.folio.rest.jaxrs.model.CompositePurchaseOrder)8 Cost (org.folio.rest.jaxrs.model.Cost)7 EncumbranceRollover (org.folio.rest.jaxrs.model.EncumbranceRollover)7 LedgerFiscalYearRollover (org.folio.rest.jaxrs.model.LedgerFiscalYearRollover)7 List (java.util.List)6 JsonObject (io.vertx.core.json.JsonObject)5 ArrayList (java.util.ArrayList)5 ReEncumbranceHolder (org.folio.models.ReEncumbranceHolder)5 Collectors.toList (java.util.stream.Collectors.toList)4 ConversionQuery (javax.money.convert.ConversionQuery)4 IOException (java.io.IOException)3 CompletableFuture.completedFuture (java.util.concurrent.CompletableFuture.completedFuture)3 ExchangeRate (javax.money.convert.ExchangeRate)3