Search in sources :

Example 1 with COMPLETED

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

the class JournalRecordDaoTest method shouldReturnSortedJournalRecordListByActionType.

@Test
public void shouldReturnSortedJournalRecordListByActionType(TestContext testContext) {
    InitJobExecutionsRsDto response = constructAndPostInitJobExecutionRqDto(1);
    List<JobExecution> createdJobExecutions = response.getJobExecutions();
    Assert.assertThat(createdJobExecutions.size(), is(1));
    JobExecution jobExec = createdJobExecutions.get(0);
    JournalRecord journalRecord1 = new JournalRecord().withJobExecutionId(jobExec.getId()).withSourceRecordOrder(0).withSourceId(UUID.randomUUID().toString()).withEntityType(JournalRecord.EntityType.MARC_BIBLIOGRAPHIC).withEntityId(UUID.randomUUID().toString()).withActionType(CREATE).withActionDate(new Date()).withActionStatus(COMPLETED);
    JournalRecord journalRecord2 = new JournalRecord().withJobExecutionId(jobExec.getId()).withSourceRecordOrder(0).withSourceId(UUID.randomUUID().toString()).withEntityType(JournalRecord.EntityType.INSTANCE).withEntityId(UUID.randomUUID().toString()).withActionType(MODIFY).withActionDate(new Date()).withActionStatus(COMPLETED);
    JournalRecord journalRecord3 = new JournalRecord().withJobExecutionId(jobExec.getId()).withSourceRecordOrder(0).withSourceId(UUID.randomUUID().toString()).withEntityType(JournalRecord.EntityType.INSTANCE).withEntityId(UUID.randomUUID().toString()).withActionType(DELETE).withActionDate(new Date()).withActionStatus(COMPLETED);
    Async async = testContext.async();
    Future<List<JournalRecord>> getFuture = journalRecordDao.save(journalRecord1, TENANT_ID).compose(ar -> journalRecordDao.save(journalRecord2, TENANT_ID)).compose(ar -> journalRecordDao.save(journalRecord3, TENANT_ID)).compose(ar -> journalRecordDao.getByJobExecutionId(jobExec.getId(), "action_type", "asc", TENANT_ID));
    getFuture.onComplete(ar -> {
        testContext.verify(v -> {
            Assert.assertTrue(ar.succeeded());
            List<JournalRecord> journalRecords = ar.result();
            Assert.assertEquals(3, journalRecords.size());
            Assert.assertThat(journalRecords.get(0).getActionType(), lessThan(journalRecords.get(1).getActionType()));
            Assert.assertThat(journalRecords.get(1).getActionType(), lessThan(journalRecords.get(2).getActionType()));
        });
        async.complete();
    });
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) TestContext(io.vertx.ext.unit.TestContext) Async(io.vertx.ext.unit.Async) Date(java.util.Date) RunWith(org.junit.runner.RunWith) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) MockitoAnnotations(org.mockito.MockitoAnnotations) JobExecution(org.folio.rest.jaxrs.model.JobExecution) Spy(org.mockito.Spy) InitJobExecutionsRsDto(org.folio.rest.jaxrs.model.InitJobExecutionsRsDto) Matchers.lessThan(org.hamcrest.Matchers.lessThan) ERROR(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.ERROR) MODIFY(org.folio.rest.jaxrs.model.JournalRecord.ActionType.MODIFY) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) DELETE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.DELETE) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Vertx(io.vertx.core.Vertx) Test(org.junit.Test) IOException(java.io.IOException) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) UUID(java.util.UUID) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) Future(io.vertx.core.Future) List(java.util.List) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Assert(org.junit.Assert) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) Async(io.vertx.ext.unit.Async) List(java.util.List) InitJobExecutionsRsDto(org.folio.rest.jaxrs.model.InitJobExecutionsRsDto) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Date(java.util.Date) Test(org.junit.Test) AbstractRestTest(org.folio.rest.impl.AbstractRestTest)

Example 2 with COMPLETED

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

the class StoredRecordChunksKafkaHandler method buildJournalRecords.

private JsonArray buildJournalRecords(List<Record> storedRecords, Optional<JsonObject> mappingRulesOptional, String tenantId) {
    EntityType entityType = getEntityType(storedRecords);
    JsonArray journalRecords = new JsonArray();
    String titleFieldTag = null;
    List<String> subfieldCodes = null;
    if (mappingRulesOptional.isPresent()) {
        JsonObject mappingRules = mappingRulesOptional.get();
        Optional<String> titleFieldOptional = getTitleFieldTagByInstanceFieldPath(mappingRules);
        if (titleFieldOptional.isPresent()) {
            titleFieldTag = titleFieldOptional.get();
            subfieldCodes = mappingRules.getJsonArray(titleFieldTag).stream().map(JsonObject.class::cast).filter(fieldMappingRule -> fieldMappingRule.getString("target").equals(INSTANCE_TITLE_FIELD_PATH)).flatMap(fieldMappingRule -> fieldMappingRule.getJsonArray("subfield").stream()).map(subfieldCode -> subfieldCode.toString()).collect(Collectors.toList());
        }
    }
    for (Record record : storedRecords) {
        JournalRecord journalRecord = new JournalRecord().withJobExecutionId(record.getSnapshotId()).withSourceRecordOrder(record.getOrder()).withSourceId(record.getId()).withEntityType(entityType).withEntityId(record.getId()).withActionType(CREATE).withActionStatus(COMPLETED).withActionDate(new Date()).withTitle(allNotNull(record.getParsedRecord(), titleFieldTag) ? ParsedRecordUtil.retrieveDataByField(record.getParsedRecord(), titleFieldTag, subfieldCodes) : null);
        journalRecords.add(JsonObject.mapFrom(journalRecord));
    }
    return journalRecords;
}
Also used : EntityType(org.folio.rest.jaxrs.model.JournalRecord.EntityType) JsonArray(io.vertx.core.json.JsonArray) Json(io.vertx.core.json.Json) Date(java.util.Date) Autowired(org.springframework.beans.factory.annotation.Autowired) MARC_HOLDING(org.folio.rest.jaxrs.model.Record.RecordType.MARC_HOLDING) RecordsBatchResponse(org.folio.rest.jaxrs.model.RecordsBatchResponse) DI_EDIFACT_RECORD_CREATED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_EDIFACT_RECORD_CREATED) MARC_AUTHORITY(org.folio.rest.jaxrs.model.Record.RecordType.MARC_AUTHORITY) RecordType(org.folio.rest.jaxrs.model.Record.RecordType) DI_SRS_MARC_BIB_RECORD_CREATED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_CREATED) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) MappingRuleCacheKey(org.folio.services.entity.MappingRuleCacheKey) DI_SRS_MARC_AUTHORITY_RECORD_CREATED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_AUTHORITY_RECORD_CREATED) JsonObject(io.vertx.core.json.JsonObject) EntityType(org.folio.rest.jaxrs.model.JournalRecord.EntityType) RecordsPublishingService(org.folio.services.RecordsPublishingService) Event(org.folio.rest.jaxrs.model.Event) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Record(org.folio.rest.jaxrs.model.Record) Vertx(io.vertx.core.Vertx) COMPLETED(org.folio.rest.jaxrs.model.JournalRecord.ActionStatus.COMPLETED) AsyncRecordHandler(org.folio.kafka.AsyncRecordHandler) Future(io.vertx.core.Future) Collectors(java.util.stream.Collectors) OkapiConnectionParams(org.folio.dataimport.util.OkapiConnectionParams) MappingRuleCache(org.folio.services.MappingRuleCache) EDIFACT(org.folio.rest.jaxrs.model.Record.RecordType.EDIFACT) JsonArray(io.vertx.core.json.JsonArray) Component(org.springframework.stereotype.Component) List(java.util.List) MARC_BIB(org.folio.rest.jaxrs.model.Record.RecordType.MARC_BIB) Logger(org.apache.logging.log4j.Logger) JournalService(org.folio.services.journal.JournalService) ObjectUtils.allNotNull(org.apache.commons.lang3.ObjectUtils.allNotNull) KafkaConsumerRecord(io.vertx.kafka.client.consumer.KafkaConsumerRecord) DataImportEventTypes(org.folio.rest.jaxrs.model.DataImportEventTypes) ParsedRecordUtil(org.folio.services.util.ParsedRecordUtil) EventProcessedService(org.folio.services.EventProcessedService) Optional(java.util.Optional) DI_SRS_MARC_HOLDING_RECORD_CREATED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_HOLDING_RECORD_CREATED) KafkaHeader(io.vertx.kafka.client.producer.KafkaHeader) LogManager(org.apache.logging.log4j.LogManager) KafkaHeaderUtils(org.folio.kafka.KafkaHeaderUtils) CREATE(org.folio.rest.jaxrs.model.JournalRecord.ActionType.CREATE) JsonObject(io.vertx.core.json.JsonObject) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Record(org.folio.rest.jaxrs.model.Record) KafkaConsumerRecord(io.vertx.kafka.client.consumer.KafkaConsumerRecord) JournalRecord(org.folio.rest.jaxrs.model.JournalRecord) Date(java.util.Date)

Example 3 with COMPLETED

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

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnAuthorityCreated.

@Test
public void shouldReturnAuthorityCreated(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_AUTHORITY, COMPLETED, null)).compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, null, 0, CREATE, AUTHORITY, 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.size()", is(1)).body("totalRecords", is(1)).body("entries[0].sourceRecordId", is(sourceRecordId)).body("entries[0].sourceRecordTitle", is(recordTitle)).body("entries[0].sourceRecordActionStatus", is(ActionStatus.CREATED.value())).body("entries[0].authorityActionStatus", is(ActionStatus.CREATED.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 4 with COMPLETED

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

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnMarcBibUpdatedWhenMarcBibWasModified.

@Test
public void shouldReturnMarcBibUpdatedWhenMarcBibWasModified(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, null, null, 0, MODIFY, 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 5 with COMPLETED

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

the class MetaDataProviderJobLogEntriesAPITest method shouldReturnHoldingsTitleWithHoldingsHrid.

@Test
public void shouldReturnHoldingsTitleWithHoldingsHrid(TestContext context) {
    Async async = context.async();
    JobExecution createdJobExecution = constructAndPostInitJobExecutionRqDto(1).getJobExecutions().get(0);
    String sourceRecordId = UUID.randomUUID().toString();
    Future<JournalRecord> future = Future.succeededFuture().compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, null, null, 0, CREATE, MARC_HOLDINGS, COMPLETED, null)).compose(v -> createJournalRecord(createdJobExecution.getId(), sourceRecordId, null, "ho00000000001", null, 0, CREATE, HOLDINGS, 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.size()", is(1)).body("totalRecords", is(1)).body("entries[0].sourceRecordId", is(sourceRecordId)).body("entries[0].sourceRecordTitle", is("Holdings ho00000000001")).body("entries[0].holdingsRecordHridList[0]", is("ho00000000001")).body("entries[0].sourceRecordType", is(MARC_HOLDINGS.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)

Aggregations

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