Search in sources :

Example 26 with JournalRecord

use of org.folio.rest.jaxrs.model.JournalRecord in project mod-source-record-manager by folio-org.

the class InvoiceUtil method buildInvoiceRecord.

private static Map<String, Object> buildInvoiceRecord(DataImportEventPayload eventPayload) throws JournalRecordMapperException {
    try {
        String edifactRecordAsString = eventPayload.getContext().get(EDIFACT_INVOICE.value());
        Record edifactRecord = new ObjectMapper().readValue(edifactRecordAsString, Record.class);
        String recordAsString = eventPayload.getContext().get(INVOICE.value());
        JsonObject invoiceJson = new JsonObject(recordAsString);
        Integer invoiceOrder = edifactRecord.getOrder() != null ? edifactRecord.getOrder() : 0;
        JournalRecord journalRecord = new JournalRecord().withJobExecutionId(eventPayload.getJobExecutionId()).withSourceId(edifactRecord.getId()).withSourceRecordOrder(invoiceOrder).withEntityType(INVOICE).withEntityId(invoiceJson.getString(FIELD_ID)).withTitle(INVOICE_TITLE).withEntityHrId(invoiceJson.getString(FIELD_FOLIO_INVOICE_NO)).withActionType(ActionType.CREATE).withActionDate(new Date()).withActionStatus(isInvoiceIncorrect(eventPayload) ? ActionStatus.ERROR : ActionStatus.COMPLETED).withError(eventPayload.getEventType().equals(DI_ERROR.value()) ? eventPayload.getContext().get(ERROR_KEY) : "");
        return Map.of(FIELD_INVOICE_NO, StringUtils.isNotBlank(invoiceJson.getString(FIELD_VENDOR_INVOICE_NO)) ? invoiceJson.getString(FIELD_VENDOR_INVOICE_NO) : NO_VENDOR_INVOICE_NUMBER, FIELD_SOURCE_ID, edifactRecord.getId(), FIELD_INVOICE_ORDER, invoiceOrder, JOURNAL_RECORD, journalRecord);
    } catch (Exception e) {
        throw new JournalRecordMapperException(INVOICE_MAPPING_EXCEPTION_MSG, e);
    }
}
Also used : JsonObject(io.vertx.core.json.JsonObject) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Record(org.folio.rest.jaxrs.model.Record) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Date(java.util.Date) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException)

Example 27 with JournalRecord

use of org.folio.rest.jaxrs.model.JournalRecord in project mod-source-record-manager by folio-org.

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnMarcBibUpdatedWhenMarcBibWasUpdated.

@Test
public void shouldReturnMarcBibUpdatedWhenMarcBibWasUpdated(TestContext context) {
    Async async = context.async();
    JobExecution createdJobExecution = constructAndPostInitJobExecutionRqDto(1).getJobExecutions().get(0);
    String sourceRecordId = UUID.randomUUID().toString();
    String recordTitle = "test title";
    Future<JournalRecord> future = Future.succeededFuture().compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, recordTitle, 0, CREATE, MARC_BIBLIOGRAPHIC, COMPLETED, null)).compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, "in00000000001", null, 0, UPDATE, MARC_BIBLIOGRAPHIC, COMPLETED, null)).onFailure(context::fail);
    future.onComplete(ar -> context.verify(v -> {
        RestAssured.given().spec(spec).when().get(GET_JOB_EXECUTION_JOURNAL_RECORDS_PATH + "/" + createdJobExecution.getId()).then().statusCode(HttpStatus.SC_OK).body("entries", hasSize(1)).body("totalRecords", is(1)).body("entries[0].jobExecutionId", is(createdJobExecution.getId())).body("entries[0].sourceRecordId", is(sourceRecordId)).body("entries[0].sourceRecordTitle", is(recordTitle)).body("entries[0].sourceRecordActionStatus", is(ActionStatus.UPDATED.value()));
        async.complete();
    }));
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) EDIFACT(org.folio.rest.jaxrs.model.JournalRecord.EntityType.EDIFACT) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_BIBLIOGRAPHIC) TestContext(io.vertx.ext.unit.TestContext) MARC_AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_AUTHORITY) Date(java.util.Date) Matchers.not(org.hamcrest.Matchers.not) HttpStatus(org.apache.http.HttpStatus) MockitoAnnotations(org.mockito.MockitoAnnotations) Matchers.everyItem(org.hamcrest.Matchers.everyItem) Matchers.nullValue(org.hamcrest.Matchers.nullValue) JobExecution(org.folio.rest.jaxrs.model.JobExecution) Spy(org.mockito.Spy) ActionStatus(org.folio.rest.jaxrs.model.ActionStatus) ERROR(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR) HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.HOLDINGS) MODIFY(org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.AUTHORITY) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) UUID(java.util.UUID) Future(io.vertx.core.Future) List(java.util.List) Matchers.is(org.hamcrest.Matchers.is) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) RestAssured(io.restassured.RestAssured) Async(io.vertx.ext.unit.Async) JobLogEntryDtoCollection(org.folio.rest.jaxrs.model.JobLogEntryDtoCollection) RunWith(org.junit.runner.RunWith) JobLogEntryDto(org.folio.rest.jaxrs.model.JobLogEntryDto) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) CompositeFuture(io.vertx.core.CompositeFuture) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) MARC_HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_HOLDINGS) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) ITEM(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ITEM) Matchers.empty(org.hamcrest.Matchers.empty) UPDATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.UPDATE) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Test(org.junit.Test) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) INSTANCE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INSTANCE) ORDER(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ORDER) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) NON_MATCH(org.folio.rest.jaxrs.model.JournalRecord.ActionType.NON_MATCH) INVOICE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INVOICE) Assert(org.junit.Assert) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) JournalRecordDaoImpl(org.folio.dao.JournalRecordDaoImpl) Async(io.vertx.ext.unit.Async) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Test(org.junit.Test)

Example 28 with JournalRecord

use of org.folio.rest.jaxrs.model.JournalRecord in project mod-source-record-manager by folio-org.

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnInstanceDiscardedWhenInstanceCreationFailed.

@Test
public void shouldReturnInstanceDiscardedWhenInstanceCreationFailed(TestContext context) {
    // test
    Async async = context.async();
    JobExecution createdJobExecution = constructAndPostInitJobExecutionRqDto(1).getJobExecutions().get(0);
    String sourceRecordId = UUID.randomUUID().toString();
    String recordTitle = "test title";
    Future<JournalRecord> future = Future.succeededFuture().compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, recordTitle, 0, CREATE, MARC_BIBLIOGRAPHIC, COMPLETED, null)).compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, null, 0, CREATE, INSTANCE, ERROR, "error msg")).onFailure(context::fail);
    future.onComplete(ar -> context.verify(v -> {
        RestAssured.given().spec(spec).when().get(GET_JOB_EXECUTION_JOURNAL_RECORDS_PATH + "/" + createdJobExecution.getId()).then().statusCode(HttpStatus.SC_OK).body("entries.size()", is(1)).body("totalRecords", is(1)).body("entries[0].jobExecutionId", is(createdJobExecution.getId())).body("entries[0].sourceRecordId", is(sourceRecordId)).body("entries[0].sourceRecordTitle", is(recordTitle)).body("entries[0].instanceActionStatus", is(ActionStatus.DISCARDED.value())).body("entries[0].error", not(emptyOrNullString()));
        async.complete();
    }));
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) EDIFACT(org.folio.rest.jaxrs.model.JournalRecord.EntityType.EDIFACT) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_BIBLIOGRAPHIC) TestContext(io.vertx.ext.unit.TestContext) MARC_AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_AUTHORITY) Date(java.util.Date) Matchers.not(org.hamcrest.Matchers.not) HttpStatus(org.apache.http.HttpStatus) MockitoAnnotations(org.mockito.MockitoAnnotations) Matchers.everyItem(org.hamcrest.Matchers.everyItem) Matchers.nullValue(org.hamcrest.Matchers.nullValue) JobExecution(org.folio.rest.jaxrs.model.JobExecution) Spy(org.mockito.Spy) ActionStatus(org.folio.rest.jaxrs.model.ActionStatus) ERROR(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR) HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.HOLDINGS) MODIFY(org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.AUTHORITY) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) UUID(java.util.UUID) Future(io.vertx.core.Future) List(java.util.List) Matchers.is(org.hamcrest.Matchers.is) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) RestAssured(io.restassured.RestAssured) Async(io.vertx.ext.unit.Async) JobLogEntryDtoCollection(org.folio.rest.jaxrs.model.JobLogEntryDtoCollection) RunWith(org.junit.runner.RunWith) JobLogEntryDto(org.folio.rest.jaxrs.model.JobLogEntryDto) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) CompositeFuture(io.vertx.core.CompositeFuture) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) MARC_HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_HOLDINGS) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) ITEM(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ITEM) Matchers.empty(org.hamcrest.Matchers.empty) UPDATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.UPDATE) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Test(org.junit.Test) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) INSTANCE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INSTANCE) ORDER(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ORDER) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) NON_MATCH(org.folio.rest.jaxrs.model.JournalRecord.ActionType.NON_MATCH) INVOICE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INVOICE) Assert(org.junit.Assert) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) JournalRecordDaoImpl(org.folio.dao.JournalRecordDaoImpl) Async(io.vertx.ext.unit.Async) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Test(org.junit.Test)

Example 29 with JournalRecord

use of org.folio.rest.jaxrs.model.JournalRecord in project mod-source-record-manager by folio-org.

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnInstanceDiscardedWhenInstanceWasNotMatched.

@Test
public void shouldReturnInstanceDiscardedWhenInstanceWasNotMatched(TestContext context) {
    Async async = context.async();
    JobExecution createdJobExecution = constructAndPostInitJobExecutionRqDto(1).getJobExecutions().get(0);
    String sourceRecordId = UUID.randomUUID().toString();
    String recordTitle = "test title";
    Future<JournalRecord> future = Future.succeededFuture().compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, recordTitle, 0, CREATE, MARC_BIBLIOGRAPHIC, COMPLETED, null)).compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, "in00000000001", null, 0, NON_MATCH, INSTANCE, COMPLETED, null)).onSuccess(v -> async.complete()).onFailure(context::fail);
    future.onComplete(ar -> context.verify(v -> {
        RestAssured.given().spec(spec).when().get(GET_JOB_EXECUTION_JOURNAL_RECORDS_PATH + "/" + createdJobExecution.getId()).then().statusCode(HttpStatus.SC_OK).body("entries.size()", is(1)).body("totalRecords", is(1)).body("entries[0].jobExecutionId", is(createdJobExecution.getId())).body("entries[0].sourceRecordId", is(sourceRecordId)).body("entries[0].sourceRecordTitle", is(recordTitle)).body("entries[0].sourceRecordActionStatus", is(ActionStatus.CREATED.value())).body("entries[0].instanceActionStatus", is(ActionStatus.DISCARDED.value())).body("entries[0].error", emptyOrNullString());
        async.complete();
    }));
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) EDIFACT(org.folio.rest.jaxrs.model.JournalRecord.EntityType.EDIFACT) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_BIBLIOGRAPHIC) TestContext(io.vertx.ext.unit.TestContext) MARC_AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_AUTHORITY) Date(java.util.Date) Matchers.not(org.hamcrest.Matchers.not) HttpStatus(org.apache.http.HttpStatus) MockitoAnnotations(org.mockito.MockitoAnnotations) Matchers.everyItem(org.hamcrest.Matchers.everyItem) Matchers.nullValue(org.hamcrest.Matchers.nullValue) JobExecution(org.folio.rest.jaxrs.model.JobExecution) Spy(org.mockito.Spy) ActionStatus(org.folio.rest.jaxrs.model.ActionStatus) ERROR(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR) HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.HOLDINGS) MODIFY(org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.AUTHORITY) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) UUID(java.util.UUID) Future(io.vertx.core.Future) List(java.util.List) Matchers.is(org.hamcrest.Matchers.is) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) RestAssured(io.restassured.RestAssured) Async(io.vertx.ext.unit.Async) JobLogEntryDtoCollection(org.folio.rest.jaxrs.model.JobLogEntryDtoCollection) RunWith(org.junit.runner.RunWith) JobLogEntryDto(org.folio.rest.jaxrs.model.JobLogEntryDto) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) CompositeFuture(io.vertx.core.CompositeFuture) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) MARC_HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_HOLDINGS) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) ITEM(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ITEM) Matchers.empty(org.hamcrest.Matchers.empty) UPDATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.UPDATE) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Test(org.junit.Test) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) INSTANCE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INSTANCE) ORDER(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ORDER) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) NON_MATCH(org.folio.rest.jaxrs.model.JournalRecord.ActionType.NON_MATCH) INVOICE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INVOICE) Assert(org.junit.Assert) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) JournalRecordDaoImpl(org.folio.dao.JournalRecordDaoImpl) Async(io.vertx.ext.unit.Async) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Test(org.junit.Test)

Example 30 with JournalRecord

use of org.folio.rest.jaxrs.model.JournalRecord in project mod-source-record-manager by folio-org.

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnNotEmptyMarcBibErrorWhenMarcBibFailed.

@Test
public void shouldReturnNotEmptyMarcBibErrorWhenMarcBibFailed(TestContext context) {
    Async async = context.async();
    JobExecution createdJobExecution = constructAndPostInitJobExecutionRqDto(1).getJobExecutions().get(0);
    String sourceRecordId = UUID.randomUUID().toString();
    String recordTitle = "test title";
    Future<JournalRecord> future = Future.succeededFuture().compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, recordTitle, 0, CREATE, MARC_BIBLIOGRAPHIC, ERROR, "MarcBib error msg")).onFailure(context::fail);
    future.onComplete(ar -> context.verify(v -> {
        RestAssured.given().spec(spec).when().get(GET_JOB_EXECUTION_JOURNAL_RECORDS_PATH + "/" + createdJobExecution.getId() + "/records/" + sourceRecordId).then().statusCode(HttpStatus.SC_OK).body("jobExecutionId", is(createdJobExecution.getId())).body("sourceRecordId", is(sourceRecordId)).body("sourceRecordTitle", is(recordTitle)).body("sourceRecordOrder", is(0)).body("error", is("MarcBib error msg"));
        async.complete();
    }));
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) EDIFACT(org.folio.rest.jaxrs.model.JournalRecord.EntityType.EDIFACT) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_BIBLIOGRAPHIC) TestContext(io.vertx.ext.unit.TestContext) MARC_AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_AUTHORITY) Date(java.util.Date) Matchers.not(org.hamcrest.Matchers.not) HttpStatus(org.apache.http.HttpStatus) MockitoAnnotations(org.mockito.MockitoAnnotations) Matchers.everyItem(org.hamcrest.Matchers.everyItem) Matchers.nullValue(org.hamcrest.Matchers.nullValue) JobExecution(org.folio.rest.jaxrs.model.JobExecution) Spy(org.mockito.Spy) ActionStatus(org.folio.rest.jaxrs.model.ActionStatus) ERROR(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR) HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.HOLDINGS) MODIFY(org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) AUTHORITY(org.folio.rest.jaxrs.model.JournalRecord.EntityType.AUTHORITY) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) UUID(java.util.UUID) Future(io.vertx.core.Future) List(java.util.List) Matchers.is(org.hamcrest.Matchers.is) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) RestAssured(io.restassured.RestAssured) Async(io.vertx.ext.unit.Async) JobLogEntryDtoCollection(org.folio.rest.jaxrs.model.JobLogEntryDtoCollection) RunWith(org.junit.runner.RunWith) JobLogEntryDto(org.folio.rest.jaxrs.model.JobLogEntryDto) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) CompositeFuture(io.vertx.core.CompositeFuture) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) MARC_HOLDINGS(org.folio.rest.jaxrs.model.JournalRecord.EntityType.MARC_HOLDINGS) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) ITEM(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ITEM) Matchers.empty(org.hamcrest.Matchers.empty) UPDATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.UPDATE) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Test(org.junit.Test) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) INSTANCE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INSTANCE) ORDER(org.folio.rest.jaxrs.model.JournalRecord.EntityType.ORDER) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) NON_MATCH(org.folio.rest.jaxrs.model.JournalRecord.ActionType.NON_MATCH) INVOICE(org.folio.rest.jaxrs.model.JournalRecord.EntityType.INVOICE) Assert(org.junit.Assert) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) JournalRecordDaoImpl(org.folio.dao.JournalRecordDaoImpl) Async(io.vertx.ext.unit.Async) Matchers.emptyOrNullString(org.hamcrest.Matchers.emptyOrNullString) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Test(org.junit.Test)

Aggregations

JournalRecord (org.folio.rest.jaxrs.model.JournalRecord)52 Test (org.junit.Test)42 Date (java.util.Date)40 Future (io.vertx.core.Future)34 List (java.util.List)34 AbstractRestTest (org.folio.rest.impl.AbstractRestTest)34 JobExecution (org.folio.rest.jaxrs.model.JobExecution)34 COMPLETED (org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED)34 CREATE (org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE)34 Async (io.vertx.ext.unit.Async)33 TestContext (io.vertx.ext.unit.TestContext)33 VertxUnitRunner (io.vertx.ext.unit.junit.VertxUnitRunner)33 UUID (java.util.UUID)33 PostgresClientFactory (org.folio.dao.util.PostgresClientFactory)33 ERROR (org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR)33 MODIFY (org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY)33 Matchers.is (org.hamcrest.Matchers.is)33 Assert (org.junit.Assert)33 Before (org.junit.Before)33 RunWith (org.junit.runner.RunWith)33