Search in sources :

Example 1 with EncumbranceService

use of org.folio.services.finance.transaction.EncumbranceService in project mod-invoice by folio-org.

the class InvoiceCancelServiceTest method initMocks.

@BeforeEach
public void initMocks() {
    requestContextMock = Mockito.mock(RequestContext.class, new RuntimeExceptionAnswer());
    restClient = Mockito.mock(RestClient.class, new RuntimeExceptionAnswer());
    doReturn(Vertx.vertx().getOrCreateContext()).when(requestContextMock).getContext();
    BaseTransactionService baseTransactionService = new BaseTransactionService(restClient);
    OrderTransactionSummaryService orderTransactionSummaryService = new OrderTransactionSummaryService(restClient);
    EncumbranceService encumbranceService = new EncumbranceService(baseTransactionService, orderTransactionSummaryService);
    InvoiceTransactionSummaryService invoiceTransactionSummaryService = new InvoiceTransactionSummaryService(restClient);
    VoucherRetrieveService voucherRetrieveService = new VoucherRetrieveService(restClient);
    VoucherCommandService voucherCommandService = new VoucherCommandService(restClient, null, voucherRetrieveService, null, null, null);
    OrderLineService orderLineService = new OrderLineService(restClient);
    InvoiceLineService invoiceLineService = new InvoiceLineService(restClient);
    OrderService orderService = new OrderService(restClient, invoiceLineService, orderLineService);
    cancelService = new InvoiceCancelService(baseTransactionService, encumbranceService, invoiceTransactionSummaryService, voucherCommandService, orderLineService, orderService);
}
Also used : InvoiceTransactionSummaryService(org.folio.services.finance.transaction.InvoiceTransactionSummaryService) BaseTransactionService(org.folio.services.finance.transaction.BaseTransactionService) RestClient(org.folio.rest.core.RestClient) OrderTransactionSummaryService(org.folio.services.finance.transaction.OrderTransactionSummaryService) VoucherCommandService(org.folio.services.voucher.VoucherCommandService) VoucherRetrieveService(org.folio.services.voucher.VoucherRetrieveService) OrderLineService(org.folio.services.order.OrderLineService) EncumbranceService(org.folio.services.finance.transaction.EncumbranceService) RequestContext(org.folio.rest.core.models.RequestContext) OrderService(org.folio.services.order.OrderService) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

RestClient (org.folio.rest.core.RestClient)1 RequestContext (org.folio.rest.core.models.RequestContext)1 BaseTransactionService (org.folio.services.finance.transaction.BaseTransactionService)1 EncumbranceService (org.folio.services.finance.transaction.EncumbranceService)1 InvoiceTransactionSummaryService (org.folio.services.finance.transaction.InvoiceTransactionSummaryService)1 OrderTransactionSummaryService (org.folio.services.finance.transaction.OrderTransactionSummaryService)1 OrderLineService (org.folio.services.order.OrderLineService)1 OrderService (org.folio.services.order.OrderService)1 VoucherCommandService (org.folio.services.voucher.VoucherCommandService)1 VoucherRetrieveService (org.folio.services.voucher.VoucherRetrieveService)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1