Search in sources :

Example 11 with Voucher

use of org.folio.rest.jaxrs.model.Voucher in project mod-invoice by folio-org.

the class MockServer method defineRoutes.

private Router defineRoutes() {
    Router router = Router.router(vertx);
    router.route().handler(BodyHandler.create());
    router.route(HttpMethod.POST, resourcesPath(INVOICES)).handler(ctx -> handlePostEntry(ctx, Invoice.class, INVOICES));
    router.route(HttpMethod.POST, resourcesPath(INVOICE_LINES)).handler(ctx -> handlePostEntry(ctx, InvoiceLine.class, INVOICE_LINES));
    router.route(HttpMethod.POST, resourceByValuePath(VOUCHER_NUMBER_START)).handler(this::handlePostVoucherStartValue);
    router.route(HttpMethod.POST, resourcesPath(VOUCHERS_STORAGE)).handler(ctx -> handlePostEntry(ctx, Voucher.class, VOUCHERS_STORAGE));
    router.route(HttpMethod.POST, resourcesPath(VOUCHER_LINES)).handler(ctx -> handlePostEntry(ctx, VoucherLine.class, VOUCHER_LINES));
    router.route(HttpMethod.POST, "/invoice-storage/invoices/:id/documents").handler(this::handlePostInvoiceDocument);
    router.route(HttpMethod.POST, resourcesPath(BATCH_VOUCHER_EXPORT_CONFIGS)).handler(ctx -> handlePostEntry(ctx, ExportConfig.class, BATCH_VOUCHER_EXPORT_CONFIGS));
    router.route(HttpMethod.POST, "/batch-voucher-storage/export-configurations/:id/credentials").handler(this::handlePostCredentials);
    router.route(HttpMethod.POST, resourcesPath(INVOICE_TRANSACTION_SUMMARIES)).handler(this::handlePostInvoiceSummary);
    router.route(HttpMethod.POST, resourcesPath(BATCH_GROUPS)).handler(ctx -> handlePost(ctx, BatchGroup.class, BATCH_GROUPS, false));
    router.route(HttpMethod.POST, resourcesPath(FINANCE_PAYMENTS)).handler(ctx -> handlePostEntry(ctx, Transaction.class, FINANCE_PAYMENTS));
    router.route(HttpMethod.POST, resourcesPath(FINANCE_CREDITS)).handler(ctx -> handlePostEntry(ctx, Transaction.class, FINANCE_CREDITS));
    router.route(HttpMethod.POST, resourcesPath(BATCH_VOUCHER_EXPORTS_STORAGE)).handler(ctx -> handlePost(ctx, BatchVoucherExport.class, BATCH_VOUCHER_EXPORTS_STORAGE, false));
    router.route(HttpMethod.POST, resourcesPath(FINANCE_PENDING_PAYMENTS)).handler(this::handlePostPendingPayment);
    router.route(HttpMethod.POST, resourcesPath(ORDER_INVOICE_RELATIONSHIP)).handler(this::handlePostOrderInvoiceRelations);
    router.route(HttpMethod.GET, resourcesPath(INVOICES)).handler(this::handleGetInvoices);
    router.route(HttpMethod.GET, resourcesPath(INVOICE_LINES)).handler(this::handleGetInvoiceLines);
    router.route(HttpMethod.GET, resourceByIdPath(INVOICES)).handler(this::handleGetInvoiceById);
    router.route(HttpMethod.GET, resourcesPath(FOLIO_INVOICE_NUMBER)).handler(this::handleGetFolioInvoiceNumber);
    router.route(HttpMethod.GET, resourceByIdPath(INVOICE_LINES)).handler(this::handleGetInvoiceLineById);
    router.route(HttpMethod.GET, resourcesPath(INVOICE_LINE_NUMBER)).handler(this::handleGetInvoiceLineNumber);
    router.route(HttpMethod.GET, resourceByIdPath(VOUCHER_LINES)).handler(this::handleGetVoucherLineById);
    router.route(HttpMethod.GET, resourceByIdPath(VOUCHERS_STORAGE)).handler(this::handleGetVoucherById);
    router.route(HttpMethod.GET, resourceByIdPath(COMPOSITE_ORDER)).handler(this::handleGetOrderById);
    router.route(HttpMethod.GET, resourceByIdPath(ORDER_LINES)).handler(this::handleGetPoLineById);
    router.route(HttpMethod.GET, resourcesPath(ORDER_INVOICE_RELATIONSHIP)).handler(this::handleGetOrderInvoiceRelations);
    router.route(HttpMethod.GET, resourcesPath(VOUCHER_NUMBER_START)).handler(this::handleGetSequence);
    router.route(HttpMethod.GET, resourcesPath(VOUCHERS_STORAGE)).handler(this::handleGetVouchers);
    router.route(HttpMethod.GET, resourcesPath(VOUCHER_LINES)).handler(this::handleGetVoucherLines);
    router.route(HttpMethod.GET, resourcesPath(VOUCHER_NUMBER_STORAGE)).handler(this::handleGetVoucherNumber);
    router.route(HttpMethod.GET, resourcesPath(FUNDS)).handler(this::handleGetFundRecords);
    router.route(HttpMethod.GET, resourcesPath(BUDGETS)).handler(this::handleGetBudgetRecords);
    router.route(HttpMethod.GET, resourcesPath(LEDGERS)).handler(this::handleGetLedgerRecords);
    router.route(HttpMethod.GET, resourceByIdPath(LEDGERS)).handler(this::handleGetLedgerRecordsById);
    router.route(HttpMethod.GET, "/configurations/entries").handler(this::handleConfigurationModuleResponse);
    router.route(HttpMethod.GET, "/invoice-storage/invoices/:id/documents").handler(this::handleGetInvoiceDocuments);
    router.route(HttpMethod.GET, "/invoice-storage/invoices/:id/documents/:documentId").handler(this::handleGetInvoiceDocumentById);
    router.route(HttpMethod.GET, resourcesPath(ACQUISITIONS_MEMBERSHIPS)).handler(this::handleGetAcquisitionsMemberships);
    router.route(HttpMethod.GET, resourcesPath(ACQUISITIONS_UNITS)).handler(this::handleGetAcquisitionsUnits);
    router.route(HttpMethod.GET, resourcesPath(BATCH_VOUCHER_EXPORT_CONFIGS)).handler(this::handleGetBatchVoucherExportConfigs);
    router.route(HttpMethod.GET, "/batch-voucher-storage/export-configurations/:id/credentials").handler(this::handleGetBatchVoucherExportConfigCredentials);
    router.route(HttpMethod.GET, resourceByIdPath(BATCH_VOUCHER_EXPORT_CONFIGS)).handler(this::handleGetBatchVoucherExportConfigById);
    router.route(HttpMethod.GET, resourcesPath(BATCH_GROUPS)).handler(this::handleGetBatchGroups);
    router.route(HttpMethod.GET, resourceByIdPath(BATCH_GROUPS)).handler(this::handleGetBatchGroupById);
    router.route(HttpMethod.GET, resourceByIdPath(BATCH_VOUCHER_STORAGE)).handler(this::handleGetBatchVoucherById);
    router.route(HttpMethod.GET, resourcesPath(FINANCE_TRANSACTIONS)).handler(this::handleGetFinanceTransactions);
    router.route(HttpMethod.GET, "/finance/ledgers/:id/current-fiscal-year").handler(this::handleGetCurrentFiscalYearByLedgerId);
    router.route(HttpMethod.GET, resourcesPath(BATCH_VOUCHER_EXPORTS_STORAGE)).handler(this::handleGetBatchVoucherExports);
    router.route(HttpMethod.GET, resourceByIdPath(BATCH_VOUCHER_EXPORTS_STORAGE)).handler(this::handleGetBatchVoucherExportsById);
    router.get("/organizations-storage/organizations").handler(this::handleGetAccessProviders);
    router.get("/organizations-storage/organizations/:id").handler(this::handleGetVendorById);
    router.route(HttpMethod.GET, resourceByIdPath(EXPENSE_CLASSES_URL)).handler(this::handleExpenseClassesById);
    router.route(HttpMethod.GET, resourcesPath(EXPENSE_CLASSES_URL)).handler(this::handleExpenseClasses);
    router.route(HttpMethod.GET, resourcesPath(BUDGET_EXPENSE_CLASSES)).handler(this::handleGetBudgetExpenseClass);
    router.route(HttpMethod.GET, resourcesPath(FINANCE_EXCHANGE_RATE)).handler(this::handleGetRateOfExchange);
    router.route(HttpMethod.GET, resourceByIdPath(FISCAL_YEARS)).handler(this::handleFiscalYearById);
    router.route(HttpMethod.GET, resourcesPath(FISCAL_YEARS)).handler(this::handleFiscalYear);
    router.route(HttpMethod.GET, resourceByIdPath(FUNDS)).handler(this::handleFundById);
    router.route(HttpMethod.GET, "/finance/funds/:id/budget").handler(this::handleGetBudgetByFundId);
    router.route(HttpMethod.GET, "/data-import-profiles/jobProfileSnapshots/:id").handler(this::handleGetJobProfileSnapshotById);
    router.route(HttpMethod.DELETE, resourceByIdPath(INVOICES)).handler(ctx -> handleDeleteRequest(ctx, INVOICES));
    router.route(HttpMethod.DELETE, resourceByIdPath(INVOICE_LINES)).handler(ctx -> handleDeleteRequest(ctx, INVOICE_LINES));
    router.route(HttpMethod.DELETE, resourceByIdPath(VOUCHER_LINES)).handler(ctx -> handleDeleteRequest(ctx, VOUCHER_LINES));
    router.route(HttpMethod.DELETE, "/invoice-storage/invoices/:id/documents/:documentId").handler(ctx -> handleDeleteRequest(ctx, INVOICE_DOCUMENTS));
    router.route(HttpMethod.DELETE, resourceByIdPath(BATCH_VOUCHER_EXPORT_CONFIGS)).handler(ctx -> handleDeleteRequest(ctx, BATCH_VOUCHER_EXPORT_CONFIGS));
    router.route(HttpMethod.DELETE, resourceByIdPath(BATCH_GROUPS)).handler(ctx -> handleDeleteRequest(ctx, BATCH_GROUPS));
    router.route(HttpMethod.DELETE, resourceByIdPath(BATCH_VOUCHER_EXPORTS_STORAGE)).handler(ctx -> handleDeleteRequest(ctx, BATCH_VOUCHER_EXPORTS_STORAGE));
    router.route(HttpMethod.PUT, resourceByIdPath(INVOICES)).handler(ctx -> handlePutGenericSubObj(ctx, INVOICES));
    router.route(HttpMethod.PUT, resourceByIdPath(INVOICE_LINES)).handler(ctx -> handlePutGenericSubObj(ctx, INVOICE_LINES));
    router.route(HttpMethod.PUT, resourceByIdPath(VOUCHERS_STORAGE)).handler(ctx -> handlePutGenericSubObj(ctx, VOUCHERS_STORAGE));
    router.route(HttpMethod.PUT, resourceByIdPath(VOUCHER_LINES)).handler(ctx -> handlePutGenericSubObj(ctx, VOUCHER_LINES));
    router.route(HttpMethod.PUT, resourceByIdPath(ORDER_LINES)).handler(ctx -> handlePutGenericSubObj(ctx, ResourcePathResolver.ORDER_LINES));
    router.route(HttpMethod.PUT, resourceByIdPath(BATCH_VOUCHER_EXPORT_CONFIGS)).handler(ctx -> handlePutGenericSubObj(ctx, ResourcePathResolver.BATCH_VOUCHER_EXPORT_CONFIGS));
    router.route(HttpMethod.PUT, "/batch-voucher-storage/export-configurations/:id/credentials").handler(ctx -> handlePutGenericSubObj(ctx, BATCH_VOUCHER_EXPORT_CONFIGS_CREDENTIALS));
    router.route(HttpMethod.PUT, resourceByIdPath(BATCH_GROUPS)).handler(ctx -> handlePutGenericSubObj(ctx, BATCH_GROUPS));
    router.route(HttpMethod.PUT, resourceByIdPath(BATCH_VOUCHER_EXPORTS_STORAGE)).handler(ctx -> handlePutGenericSubObj(ctx, BATCH_VOUCHER_EXPORTS_STORAGE));
    return router;
}
Also used : VoucherLine(org.folio.rest.acq.model.VoucherLine) BatchGroup(org.folio.rest.acq.model.BatchGroup) Invoice(org.folio.rest.jaxrs.model.Invoice) Transaction(org.folio.rest.acq.model.finance.Transaction) InvoiceLine(org.folio.rest.jaxrs.model.InvoiceLine) ExportConfig(org.folio.rest.jaxrs.model.ExportConfig) Router(io.vertx.ext.web.Router) BatchVoucherExport(org.folio.rest.jaxrs.model.BatchVoucherExport) Voucher(org.folio.rest.jaxrs.model.Voucher) BatchVoucher(org.folio.rest.jaxrs.model.BatchVoucher)

Example 12 with Voucher

use of org.folio.rest.jaxrs.model.Voucher in project mod-invoice by folio-org.

the class InvoiceLinesRetrieveServiceTest method positiveGetInvoiceLinesByChunksTest.

@Test
public void positiveGetInvoiceLinesByChunksTest() throws IOException, ExecutionException, InterruptedException {
    RestClient restClient = new RestClient();
    InvoiceLinesRetrieveService service = new InvoiceLinesRetrieveService(new InvoiceLineService(restClient));
    JsonObject vouchersList = new JsonObject(getMockData(VOUCHERS_LIST_PATH));
    List<Voucher> vouchers = vouchersList.getJsonArray("vouchers").stream().map(obj -> ((JsonObject) obj).mapTo(Voucher.class)).collect(toList());
    vouchers.remove(1);
    CompletableFuture<List<InvoiceLineCollection>> future = service.getInvoiceLineByChunks(vouchers, new RequestContext(context, okapiHeaders));
    List<InvoiceLineCollection> lineCollections = future.get();
    Assertions.assertEquals(3, lineCollections.get(0).getInvoiceLines().size());
}
Also used : RestClient(org.folio.rest.core.RestClient) BeforeEach(org.junit.jupiter.api.BeforeEach) InvoiceLine(org.folio.rest.jaxrs.model.InvoiceLine) Vertx(io.vertx.core.Vertx) Autowired(org.springframework.beans.factory.annotation.Autowired) IOException(java.io.IOException) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) VoucherCollection(org.folio.rest.jaxrs.model.VoucherCollection) ApiTestSuite.mockPort(org.folio.ApiTestSuite.mockPort) Context(io.vertx.core.Context) ApiTestBase(org.folio.rest.impl.ApiTestBase) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Voucher(org.folio.rest.jaxrs.model.Voucher) Map(java.util.Map) RequestContext(org.folio.rest.core.models.RequestContext) Assertions(org.junit.jupiter.api.Assertions) InvoiceLineService(org.folio.services.invoice.InvoiceLineService) JsonObject(io.vertx.core.json.JsonObject) OKAPI_URL(org.folio.rest.RestConstants.OKAPI_URL) RestClient(org.folio.rest.core.RestClient) JsonObject(io.vertx.core.json.JsonObject) InvoiceLineService(org.folio.services.invoice.InvoiceLineService) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) RequestContext(org.folio.rest.core.models.RequestContext) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) Voucher(org.folio.rest.jaxrs.model.Voucher) Test(org.junit.jupiter.api.Test)

Example 13 with Voucher

use of org.folio.rest.jaxrs.model.Voucher in project mod-invoice by folio-org.

the class InvoiceRetrieveServiceTest method positiveGetInvoicesByChunksTest.

@Test
public void positiveGetInvoicesByChunksTest() throws IOException, ExecutionException, InterruptedException {
    InvoiceService invoiceService = new BaseInvoiceService(new RestClient(), invoiceLineService, orderService);
    InvoiceRetrieveService service = new InvoiceRetrieveService(invoiceService);
    JsonObject vouchersList = new JsonObject(getMockData(VOUCHERS_LIST_PATH));
    List<Voucher> vouchers = vouchersList.getJsonArray("vouchers").stream().map(obj -> ((JsonObject) obj).mapTo(Voucher.class)).collect(toList());
    vouchers.remove(1);
    CompletableFuture<List<InvoiceCollection>> future = service.getInvoicesByChunks(vouchers, new RequestContext(context, okapiHeaders));
    List<InvoiceCollection> lineCollections = future.get();
    Assertions.assertEquals(3, lineCollections.get(0).getInvoices().size());
}
Also used : RestClient(org.folio.rest.core.RestClient) BeforeEach(org.junit.jupiter.api.BeforeEach) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) VoucherCollection(org.folio.rest.jaxrs.model.VoucherCollection) Context(io.vertx.core.Context) InvoiceService(org.folio.services.invoice.InvoiceService) Voucher(org.folio.rest.jaxrs.model.Voucher) Map(java.util.Map) RequestContext(org.folio.rest.core.models.RequestContext) InvoiceLineService(org.folio.services.invoice.InvoiceLineService) JsonObject(io.vertx.core.json.JsonObject) OKAPI_URL(org.folio.rest.RestConstants.OKAPI_URL) OrderService(org.folio.services.order.OrderService) InvoiceCollection(org.folio.rest.jaxrs.model.InvoiceCollection) Vertx(io.vertx.core.Vertx) IOException(java.io.IOException) ApiTestSuite.mockPort(org.folio.ApiTestSuite.mockPort) ApiTestBase(org.folio.rest.impl.ApiTestBase) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) BaseInvoiceService(org.folio.services.invoice.BaseInvoiceService) Assertions(org.junit.jupiter.api.Assertions) Invoice(org.folio.rest.jaxrs.model.Invoice) InvoiceService(org.folio.services.invoice.InvoiceService) BaseInvoiceService(org.folio.services.invoice.BaseInvoiceService) BaseInvoiceService(org.folio.services.invoice.BaseInvoiceService) RestClient(org.folio.rest.core.RestClient) JsonObject(io.vertx.core.json.JsonObject) Voucher(org.folio.rest.jaxrs.model.Voucher) InvoiceCollection(org.folio.rest.jaxrs.model.InvoiceCollection) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) RequestContext(org.folio.rest.core.models.RequestContext) Test(org.junit.jupiter.api.Test)

Example 14 with Voucher

use of org.folio.rest.jaxrs.model.Voucher in project mod-invoice by folio-org.

the class VoucherLinesRetrieveServiceTest method positiveTest.

@Test
public void positiveTest() throws IOException, ExecutionException, InterruptedException {
    VoucherLinesRetrieveService service = new VoucherLinesRetrieveService(okapiHeaders, context, "en");
    JsonObject vouchersList = new JsonObject(getMockData(VOUCHERS_LIST_PATH));
    List<Voucher> vouchers = vouchersList.getJsonArray("vouchers").stream().map(obj -> ((JsonObject) obj).mapTo(Voucher.class)).collect(toList());
    vouchers.remove(1);
    CompletableFuture<List<VoucherLineCollection>> future = service.getVoucherLinesByChunks(vouchers);
    List<VoucherLineCollection> lineCollections = future.get();
    Assertions.assertEquals(3, lineCollections.get(0).getVoucherLines().size());
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) VoucherLineCollection(org.folio.rest.acq.model.VoucherLineCollection) Vertx(io.vertx.core.Vertx) IOException(java.io.IOException) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) VoucherCollection(org.folio.rest.jaxrs.model.VoucherCollection) ApiTestSuite.mockPort(org.folio.ApiTestSuite.mockPort) Context(io.vertx.core.Context) ApiTestBase(org.folio.rest.impl.ApiTestBase) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) VoucherLine(org.folio.rest.acq.model.VoucherLine) Voucher(org.folio.rest.jaxrs.model.Voucher) Map(java.util.Map) Assertions(org.junit.jupiter.api.Assertions) JsonObject(io.vertx.core.json.JsonObject) OKAPI_URL(org.folio.rest.RestConstants.OKAPI_URL) VoucherLineCollection(org.folio.rest.acq.model.VoucherLineCollection) JsonObject(io.vertx.core.json.JsonObject) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Voucher(org.folio.rest.jaxrs.model.Voucher) Test(org.junit.jupiter.api.Test)

Example 15 with Voucher

use of org.folio.rest.jaxrs.model.Voucher in project mod-invoice by folio-org.

the class InvoicesApiTest method testTransitionFromOpenToApprovedWithMixedTypesFundDistributionsAndWithoutLockTotal.

@Test
void testTransitionFromOpenToApprovedWithMixedTypesFundDistributionsAndWithoutLockTotal() {
    logger.info("=== Test transition invoice to Approved ===");
    Invoice reqData = getMockAsJson(OPEN_INVOICE_SAMPLE_PATH).mapTo(Invoice.class);
    String id = reqData.getId();
    InvoiceLine invoiceLine = getMinimalContentInvoiceLine(id);
    invoiceLine.setSubTotal(100d);
    invoiceLine.setId(UUID.randomUUID().toString());
    FundDistribution percentageDistribution = new FundDistribution().withFundId(EXISTING_FUND_ID).withCode(null).withDistributionType(FundDistribution.DistributionType.PERCENTAGE).withValue(50d);
    FundDistribution amountDistribution = new FundDistribution().withFundId(EXISTING_FUND_ID).withDistributionType(AMOUNT).withValue(50d);
    invoiceLine.getFundDistributions().addAll(Arrays.asList(percentageDistribution, amountDistribution));
    addMockEntry(INVOICE_LINES, JsonObject.mapFrom(invoiceLine));
    reqData.setStatus(Invoice.Status.APPROVED);
    String jsonBody = JsonObject.mapFrom(reqData).encode();
    Headers headers = prepareHeaders(X_OKAPI_URL, X_OKAPI_TENANT, X_OKAPI_TOKEN, X_OKAPI_USER_ID);
    verifyPut(String.format(INVOICE_ID_PATH, id), jsonBody, headers, "", 204);
    // Verify that expected number of external calls made
    assertThat(getInvoiceRetrievals(), hasSize(1));
    assertThat(getInvoiceLineSearches(), hasSize(1));
    Invoice updatedInvoice = serverRqRs.get(INVOICES, HttpMethod.PUT).get(0).mapTo(Invoice.class);
    List<JsonObject> vouchersCreated = serverRqRs.get(VOUCHERS_STORAGE, HttpMethod.POST);
    assertThat(vouchersCreated, notNullValue());
    assertThat(vouchersCreated, hasSize(1));
    Voucher voucherCreated = vouchersCreated.get(0).mapTo(Voucher.class);
    assertThat(voucherCreated.getVoucherNumber(), equalTo(TEST_PREFIX + VOUCHER_NUMBER_VALUE));
    assertThat(voucherCreated.getSystemCurrency(), equalTo(DEFAULT_SYSTEM_CURRENCY));
    List<JsonObject> fundsSearches = serverRqRs.get(FUNDS, HttpMethod.GET);
    List<Fund> funds = fundsSearches.get(0).mapTo(FundCollection.class).getFunds();
    verifyTransitionToApproved(voucherCreated, Collections.singletonList(invoiceLine), updatedInvoice, getExpectedVoucherLinesQuantity(funds));
    checkVoucherAcqUnitIdsList(voucherCreated, reqData);
}
Also used : FundDistribution(org.folio.rest.jaxrs.model.FundDistribution) Invoice(org.folio.rest.jaxrs.model.Invoice) Fund(org.folio.rest.acq.model.finance.Fund) InvoiceLine(org.folio.rest.jaxrs.model.InvoiceLine) Headers(io.restassured.http.Headers) JsonObject(io.vertx.core.json.JsonObject) FundCollection(org.folio.rest.acq.model.finance.FundCollection) Matchers.containsString(org.hamcrest.Matchers.containsString) Voucher(org.folio.rest.jaxrs.model.Voucher) Test(org.junit.jupiter.api.Test)

Aggregations

Voucher (org.folio.rest.jaxrs.model.Voucher)28 JsonObject (io.vertx.core.json.JsonObject)24 Test (org.junit.jupiter.api.Test)18 Invoice (org.folio.rest.jaxrs.model.Invoice)17 InvoiceLine (org.folio.rest.jaxrs.model.InvoiceLine)15 Vertx (io.vertx.core.Vertx)13 List (java.util.List)12 Map (java.util.Map)12 Collectors.toList (java.util.stream.Collectors.toList)12 RequestContext (org.folio.rest.core.models.RequestContext)11 Context (io.vertx.core.Context)10 IOException (java.io.IOException)10 HashMap (java.util.HashMap)10 VoucherCollection (org.folio.rest.jaxrs.model.VoucherCollection)10 Matchers.containsString (org.hamcrest.Matchers.containsString)10 Headers (io.restassured.http.Headers)9 CompletableFuture (java.util.concurrent.CompletableFuture)9 Fund (org.folio.rest.acq.model.finance.Fund)9 FundDistribution (org.folio.rest.jaxrs.model.FundDistribution)9 FundCollection (org.folio.rest.acq.model.finance.FundCollection)7