Search in sources :

Example 1 with HeaderType

use of org.openarchives.oai._2.HeaderType in project mod-oai-pmh by folio-org.

the class AbstractHelper method createHeader.

/**
 * Creates {@link HeaderType} and Datestamp and Set
 *
 * @param instance the instance item returned by storage service
 * @param request  oai-pmh request
 * @return populated {@link HeaderType}
 */
protected HeaderType createHeader(JsonObject instance, Request request) {
    HeaderType headerType = new HeaderType().withSetSpecs("all");
    Instant instant = getInstanceDate(instance);
    String date;
    if (isDateOnlyGranularity(request)) {
        instant = instant.truncatedTo(ChronoUnit.DAYS);
        LocalDate time = LocalDate.ofInstant(instant, ZoneId.of("UTC"));
        date = ISO_UTC_DATE_ONLY.format(time);
    } else {
        LocalDateTime time = LocalDateTime.ofInstant(instant, ZoneId.of("UTC"));
        date = ISO_UTC_DATE_TIME.format(time);
    }
    return headerType.withDatestamp(date);
}
Also used : LocalDateTime(java.time.LocalDateTime) HeaderType(org.openarchives.oai._2.HeaderType) Instant(java.time.Instant) LocalDate(java.time.LocalDate)

Example 2 with HeaderType

use of org.openarchives.oai._2.HeaderType in project mod-oai-pmh by folio-org.

the class OaiPmhImplTest method makeResumptionTokenRequestsAndVerifyCount.

private ResumptionTokenType makeResumptionTokenRequestsAndVerifyCount(List<HeaderType> totalRecords, ResumptionTokenType resumptionToken, VerbType verb, int desiredCount, int expectedCursor) {
    RequestSpecification request = createBaseRequest().with().param(VERB_PARAM, verb.value()).param(RESUMPTION_TOKEN_PARAM, resumptionToken.getValue());
    OAIPMH oaipmh;
    List<HeaderType> records;
    oaipmh = verify200WithXml(request, verb);
    verifyListResponse(oaipmh, verb, desiredCount);
    resumptionToken = getResumptionToken(oaipmh, verb);
    assertThat(resumptionToken, is(notNullValue()));
    assertEquals(expectedCursor, resumptionToken.getCursor().intValue());
    records = getHeadersListDependOnVerbType(verb, oaipmh);
    totalRecords.addAll(records);
    return resumptionToken;
}
Also used : OAIPMH(org.openarchives.oai._2.OAIPMH) HeaderType(org.openarchives.oai._2.HeaderType) RequestSpecification(io.restassured.specification.RequestSpecification)

Example 3 with HeaderType

use of org.openarchives.oai._2.HeaderType in project mod-oai-pmh by folio-org.

the class OaiPmhImplTest method verifyResumptionTokenFlowForMarc21AndOaiDcMetadataPrefixes.

@ParameterizedTest
@MethodSource("metadataPrefixAndVerbProviderExceptMarc21withHoldings")
void verifyResumptionTokenFlowForMarc21AndOaiDcMetadataPrefixes(MetadataPrefix prefix, VerbType verb) {
    String maxRecordsPerResponse = System.getProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE);
    System.setProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE, "4");
    RequestSpecification request = createBaseRequest().with().param(VERB_PARAM, verb.value()).param(METADATA_PREFIX_PARAM, prefix.getName()).param(FROM_PARAM, DATE_FOR_INSTANCES_10_PARTIALLY);
    OAIPMH oaipmh = verify200WithXml(request, verb);
    verifyListResponse(oaipmh, verb, 4);
    ResumptionTokenType resumptionToken = getResumptionToken(oaipmh, verb);
    assertThat(resumptionToken, is(notNullValue()));
    assertThat(resumptionToken.getValue(), is(notNullValue()));
    assertEquals(BigInteger.TEN, resumptionToken.getCompleteListSize());
    assertEquals(BigInteger.ZERO, resumptionToken.getCursor());
    List<HeaderType> totalRecords = getHeadersListDependOnVerbType(verb, oaipmh);
    resumptionToken = makeResumptionTokenRequestsAndVerifyCount(totalRecords, resumptionToken, verb, 4, 4);
    resumptionToken = makeResumptionTokenRequestsAndVerifyCount(totalRecords, resumptionToken, verb, 2, 8);
    assertThat(resumptionToken.getValue(), isEmptyString());
    System.setProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE, maxRecordsPerResponse);
}
Also used : OAIPMH(org.openarchives.oai._2.OAIPMH) ResumptionTokenType(org.openarchives.oai._2.ResumptionTokenType) HeaderType(org.openarchives.oai._2.HeaderType) RequestSpecification(io.restassured.specification.RequestSpecification) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 4 with HeaderType

use of org.openarchives.oai._2.HeaderType in project mod-oai-pmh by folio-org.

the class OaiPmhImplTest method verifyHeaderDateStamp.

private void verifyHeaderDateStamp(OAIPMH oaipmh, VerbType verbType, String timeGranularity) {
    String verb = verbType.value();
    if (verb.equals(LIST_RECORDS.value())) {
        oaipmh.getListRecords().getRecords().stream().map(RecordType::getHeader).map(HeaderType::getDatestamp).forEach(headerDateStamp -> verifyHeaderDateStamp(headerDateStamp, timeGranularity));
    } else if (verb.equals(LIST_IDENTIFIERS.value())) {
        oaipmh.getListIdentifiers().getHeaders().stream().map(HeaderType::getDatestamp).forEach(headerDateStamp -> verifyHeaderDateStamp(headerDateStamp, timeGranularity));
    } else if (verb.equals(GET_RECORD.value())) {
        String datestamp = oaipmh.getGetRecord().getRecord().getHeader().getDatestamp();
        verifyHeaderDateStamp(datestamp, timeGranularity);
    }
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) DATE_SRS_500_ERROR_RESPONSE(org.folio.rest.impl.OkapiMockServer.DATE_SRS_500_ERROR_RESPONSE) Header(io.restassured.http.Header) Autowired(org.springframework.beans.factory.annotation.Autowired) GranularityType(org.openarchives.oai._2.GranularityType) SRS_RECORD_WITH_NEW_METADATA_DATE(org.folio.rest.impl.OkapiMockServer.SRS_RECORD_WITH_NEW_METADATA_DATE) METADATA_PREFIX_PARAM(org.folio.oaipmh.Constants.METADATA_PREFIX_PARAM) AfterAll(org.junit.jupiter.api.AfterAll) OAI_TEST_TENANT(org.folio.rest.impl.OkapiMockServer.OAI_TEST_TENANT) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) OAIPMHerrorType(org.openarchives.oai._2.OAIPMHerrorType) ResumptionTokenType(org.openarchives.oai._2.ResumptionTokenType) GZIP(org.folio.oaipmh.Constants.GZIP) RESUMPTION_TOKEN_PARAM(org.folio.oaipmh.Constants.RESUMPTION_TOKEN_PARAM) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) BeforeAll(org.junit.jupiter.api.BeforeAll) Map(java.util.Map) SRS_RECORD_WITH_INVALID_JSON_STRUCTURE(org.folio.rest.impl.OkapiMockServer.SRS_RECORD_WITH_INVALID_JSON_STRUCTURE) CANNOT_DISSEMINATE_FORMAT(org.openarchives.oai._2.OAIPMHerrorcodeType.CANNOT_DISSEMINATE_FORMAT) JsonObject(io.vertx.core.json.JsonObject) VerbType(org.openarchives.oai._2.VerbType) BigInteger(java.math.BigInteger) IDENTIFIER_PARAM(org.folio.oaipmh.Constants.IDENTIFIER_PARAM) ZoneOffset(java.time.ZoneOffset) UNTIL_PARAM(org.folio.oaipmh.Constants.UNTIL_PARAM) LIST_SETS(org.openarchives.oai._2.VerbType.LIST_SETS) DEFAULT_RECORD_DATE(org.folio.rest.impl.OkapiMockServer.DEFAULT_RECORD_DATE) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) SRS_RECORD_WITH_OLD_METADATA_DATE(org.folio.rest.impl.OkapiMockServer.SRS_RECORD_WITH_OLD_METADATA_DATE) InstancesService(org.folio.oaipmh.service.InstancesService) Arguments(org.junit.jupiter.params.provider.Arguments) PostgresClient(org.folio.rest.persist.PostgresClient) StandardCharsets(java.nio.charset.StandardCharsets) GET_ENRICHED_INSTANCES_500_ERROR_RETURNED_FROM_STORAGE_DATE(org.folio.rest.impl.OkapiMockServer.GET_ENRICHED_INSTANCES_500_ERROR_RETURNED_FROM_STORAGE_DATE) INVENTORY_27_INSTANCES_IDS_DATE(org.folio.rest.impl.OkapiMockServer.INVENTORY_27_INSTANCES_IDS_DATE) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) URLEncodedUtils(org.apache.http.client.utils.URLEncodedUtils) OAIPMHerrorcodeType(org.openarchives.oai._2.OAIPMHerrorcodeType) DATE_FOR_INSTANCES_10_PARTIALLY(org.folio.rest.impl.OkapiMockServer.DATE_FOR_INSTANCES_10_PARTIALLY) RestAssured.given(io.restassured.RestAssured.given) RestAssured(io.restassured.RestAssured) REPOSITORY_DELETED_RECORDS(org.folio.oaipmh.Constants.REPOSITORY_DELETED_RECORDS) REPOSITORY_TIME_GRANULARITY(org.folio.oaipmh.Constants.REPOSITORY_TIME_GRANULARITY) ISO_UTC_DATE_TIME(org.folio.oaipmh.Constants.ISO_UTC_DATE_TIME) VertxTestContext(io.vertx.junit5.VertxTestContext) DEFLATE(org.folio.oaipmh.Constants.DEFLATE) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) PostgresTesterContainer(org.folio.postgres.testing.PostgresTesterContainer) LocalDateTime(java.time.LocalDateTime) DATE_INVENTORY_10_INSTANCE_IDS(org.folio.rest.impl.OkapiMockServer.DATE_INVENTORY_10_INSTANCE_IDS) LIST_ILLEGAL_ARGUMENTS_ERROR(org.folio.oaipmh.Constants.LIST_ILLEGAL_ARGUMENTS_ERROR) DecoderConfig(io.restassured.config.DecoderConfig) DATE_FOR_INSTANCES_10(org.folio.rest.impl.OkapiMockServer.DATE_FOR_INSTANCES_10) THREE_INSTANCES_DATE(org.folio.rest.impl.OkapiMockServer.THREE_INSTANCES_DATE) LIST_METADATA_FORMATS(org.openarchives.oai._2.VerbType.LIST_METADATA_FORMATS) REPOSITORY_STORAGE(org.folio.oaipmh.Constants.REPOSITORY_STORAGE) Matchers.hasSize(org.hamcrest.Matchers.hasSize) NO_RECORD_FOUND_ERROR(org.folio.oaipmh.Constants.NO_RECORD_FOUND_ERROR) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) RestAssuredConfig(io.restassured.config.RestAssuredConfig) ResponseConverter(org.folio.oaipmh.ResponseConverter) ValueSource(org.junit.jupiter.params.provider.ValueSource) REPOSITORY_ENABLE_OAI_SERVICE(org.folio.oaipmh.Constants.REPOSITORY_ENABLE_OAI_SERVICE) ID_DOES_NOT_EXIST(org.openarchives.oai._2.OAIPMHerrorcodeType.ID_DOES_NOT_EXIST) Dc(org.openarchives.oai._2_0.oai_dc.Dc) DataFieldType(gov.loc.marc21.slim.DataFieldType) NO_ITEMS_DATE(org.folio.rest.impl.OkapiMockServer.NO_ITEMS_DATE) JAXBElement(javax.xml.bind.JAXBElement) Vertx(io.vertx.core.Vertx) REPOSITORY_NAME(org.folio.oaipmh.Constants.REPOSITORY_NAME) VERB_PARAM(org.folio.oaipmh.Constants.VERB_PARAM) PARTITIONABLE_RECORDS_DATE_TIME(org.folio.rest.impl.OkapiMockServer.PARTITIONABLE_RECORDS_DATE_TIME) Assert.assertTrue(org.junit.Assert.assertTrue) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString) REPOSITORY_SRS_CLIENT_IDLE_TIMEOUT_SEC(org.folio.oaipmh.Constants.REPOSITORY_SRS_CLIENT_IDLE_TIMEOUT_SEC) BAD_ARGUMENT(org.openarchives.oai._2.OAIPMHerrorcodeType.BAD_ARGUMENT) MetadataPrefix(org.folio.oaipmh.MetadataPrefix) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) RecordType(org.openarchives.oai._2.RecordType) REPOSITORY_SRS_HTTP_REQUEST_RETRY_ATTEMPTS(org.folio.oaipmh.Constants.REPOSITORY_SRS_HTTP_REQUEST_RETRY_ATTEMPTS) NO_RECORDS_DATE(org.folio.rest.impl.OkapiMockServer.NO_RECORDS_DATE) REPOSITORY_SUPPRESSED_RECORDS_PROCESSING(org.folio.oaipmh.Constants.REPOSITORY_SUPPRESSED_RECORDS_PROCESSING) UNKNOWN(org.openarchives.oai._2.VerbType.UNKNOWN) Assert.assertEquals(org.junit.Assert.assertEquals) NotThreadSafe(javax.annotation.concurrent.NotThreadSafe) CoreMatchers.is(org.hamcrest.CoreMatchers.is) ValidatableResponse(io.restassured.response.ValidatableResponse) FROM_PARAM(org.folio.oaipmh.Constants.FROM_PARAM) OFFSET_PARAM(org.folio.oaipmh.Constants.OFFSET_PARAM) HeaderType(org.openarchives.oai._2.HeaderType) Constants(org.folio.oaipmh.Constants) HttpStatus(org.apache.http.HttpStatus) StatusType(org.openarchives.oai._2.StatusType) NEXT_RECORD_ID_PARAM(org.folio.oaipmh.Constants.NEXT_RECORD_ID_PARAM) Context(io.vertx.core.Context) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) REPOSITORY_ADMIN_EMAILS(org.folio.oaipmh.Constants.REPOSITORY_ADMIN_EMAILS) TestInstance(org.junit.jupiter.api.TestInstance) ContentDecoder(io.restassured.config.DecoderConfig.ContentDecoder) Collectors.toMap(java.util.stream.Collectors.toMap) OAIPMH(org.openarchives.oai._2.OAIPMH) TOTAL_RECORDS_PARAM(org.folio.oaipmh.Constants.TOTAL_RECORDS_PARAM) IDENTIFY(org.openarchives.oai._2.VerbType.IDENTIFY) RequestSpecification(io.restassured.specification.RequestSpecification) Spy(org.mockito.Spy) DATE_SRS_ERROR_RESPONSE(org.folio.rest.impl.OkapiMockServer.DATE_SRS_ERROR_RESPONSE) BAD_RESUMPTION_TOKEN(org.openarchives.oai._2.OAIPMHerrorcodeType.BAD_RESUMPTION_TOKEN) TestUtil(org.folio.oaipmh.common.TestUtil) ModuleName(org.folio.rest.tools.utils.ModuleName) REPOSITORY_BASE_URL(org.folio.oaipmh.Constants.REPOSITORY_BASE_URL) INVENTORY_60_INSTANCE_IDS_DATE(org.folio.rest.impl.OkapiMockServer.INVENTORY_60_INSTANCE_IDS_DATE) Assert.fail(org.junit.Assert.fail) DATE_SRS_IDLE_TIMEOUT_ERROR_RESPONSE(org.folio.rest.impl.OkapiMockServer.DATE_SRS_IDLE_TIMEOUT_ERROR_RESPONSE) MethodSource(org.junit.jupiter.params.provider.MethodSource) Predicate(java.util.function.Predicate) LIST_RECORDS(org.openarchives.oai._2.VerbType.LIST_RECORDS) DATE_INVENTORY_STORAGE_ERROR_RESPONSE(org.folio.rest.impl.OkapiMockServer.DATE_INVENTORY_STORAGE_ERROR_RESPONSE) ContentType(io.restassured.http.ContentType) VertxOptions(io.vertx.core.VertxOptions) HttpHeaders(io.vertx.core.http.HttpHeaders) VertxExtension(io.vertx.junit5.VertxExtension) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) REQUEST_ID_PARAM(org.folio.oaipmh.Constants.REQUEST_ID_PARAM) Test(org.junit.jupiter.api.Test) Objects(java.util.Objects) SubfieldatafieldType(gov.loc.marc21.slim.SubfieldatafieldType) Base64(java.util.Base64) List(java.util.List) NO_RECORDS_MATCH(org.openarchives.oai._2.OAIPMHerrorcodeType.NO_RECORDS_MATCH) CollectionUtils.isNotEmpty(org.apache.commons.collections4.CollectionUtils.isNotEmpty) WebClientProvider(org.folio.oaipmh.WebClientProvider) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) OaiIdentifier(org.openarchives.oai._2_0.oai_identifier.OaiIdentifier) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) NameValuePair(org.apache.http.NameValuePair) INSTANCE_ID_WITH_INVALID_ENRICHED_INSTANCE_JSON_DATE(org.folio.rest.impl.OkapiMockServer.INSTANCE_ID_WITH_INVALID_ENRICHED_INSTANCE_JSON_DATE) LIST_NO_REQUIRED_PARAM_ERROR(org.folio.oaipmh.Constants.LIST_NO_REQUIRED_PARAM_ERROR) Json(io.vertx.core.json.Json) RestVerticle(org.folio.rest.RestVerticle) INSTANCE_WITHOUT_SRS_RECORD_DATE(org.folio.rest.impl.OkapiMockServer.INSTANCE_WITHOUT_SRS_RECORD_DATE) THREE_INSTANCES_DATE_WITH_ONE_MARK_DELETED_RECORD(org.folio.rest.impl.OkapiMockServer.THREE_INSTANCES_DATE_WITH_ONE_MARK_DELETED_RECORD) SOURCE_RECORD_STORAGE(org.folio.oaipmh.Constants.SOURCE_RECORD_STORAGE) EnumSource(org.junit.jupiter.params.provider.EnumSource) REPOSITORY_MAX_RECORDS_PER_RESPONSE(org.folio.oaipmh.Constants.REPOSITORY_MAX_RECORDS_PER_RESPONSE) SpringContextUtil(org.folio.spring.SpringContextUtil) SET_PARAM(org.folio.oaipmh.Constants.SET_PARAM) THREE_INSTANCES_DATE_TIME(org.folio.rest.impl.OkapiMockServer.THREE_INSTANCES_DATE_TIME) LIST_IDENTIFIERS(org.openarchives.oai._2.VerbType.LIST_IDENTIFIERS) PostgresClientFactory(org.folio.oaipmh.dao.PostgresClientFactory) SRS_RECORDS_WITH_CYRILLIC_DATA_DATE(org.folio.rest.impl.OkapiMockServer.SRS_RECORDS_WITH_CYRILLIC_DATA_DATE) TWO_RECORDS_WITH_ONE_INCONVERTIBLE_TO_XML(org.folio.rest.impl.OkapiMockServer.TWO_RECORDS_WITH_ONE_INCONVERTIBLE_TO_XML) ElementType(org.purl.dc.elements._1.ElementType) GET_INSTANCES_FORBIDDEN_RESPONSE_DATE(org.folio.rest.impl.OkapiMockServer.GET_INSTANCES_FORBIDDEN_RESPONSE_DATE) GET_INSTANCES_IDS_500_ERROR_RETURNED_FROM_STORAGE_DATE(org.folio.rest.impl.OkapiMockServer.GET_INSTANCES_IDS_500_ERROR_RETURNED_FROM_STORAGE_DATE) Matchers.empty(org.hamcrest.Matchers.empty) GET_RECORD(org.openarchives.oai._2.VerbType.GET_RECORD) UTF_8(java.nio.charset.StandardCharsets.UTF_8) PER_CLASS(org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS) PARTITIONABLE_RECORDS_DATE(org.folio.rest.impl.OkapiMockServer.PARTITIONABLE_RECORDS_DATE) NetworkUtils(org.folio.rest.tools.utils.NetworkUtils) INVALID_IDENTIFIER(org.folio.rest.impl.OkapiMockServer.INVALID_IDENTIFIER) EMPTY_INSTANCES_IDS_DATE(org.folio.rest.impl.OkapiMockServer.EMPTY_INSTANCES_IDS_DATE) ENRICH_INSTANCES_FORBIDDEN_RESPONSE_DATE(org.folio.rest.impl.OkapiMockServer.ENRICH_INSTANCES_FORBIDDEN_RESPONSE_DATE) DeploymentOptions(io.vertx.core.DeploymentOptions) DATE_ERROR_FROM_ENRICHED_INSTANCES_VIEW(org.folio.rest.impl.OkapiMockServer.DATE_ERROR_FROM_ENRICHED_INSTANCES_VIEW) ApplicationConfig(org.folio.config.ApplicationConfig) INVALID_INSTANCE_IDS_JSON_DATE(org.folio.rest.impl.OkapiMockServer.INVALID_INSTANCE_IDS_JSON_DATE) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) RecordType(org.openarchives.oai._2.RecordType) HeaderType(org.openarchives.oai._2.HeaderType) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString)

Example 5 with HeaderType

use of org.openarchives.oai._2.HeaderType in project mod-oai-pmh by folio-org.

the class OaiPmhImplTest method verifyResumptionTokenFlow_whenVerbListRecordsAndMetadataPrefixMarc21WithHoldings.

@ParameterizedTest
@EnumSource(value = VerbType.class, names = { "LIST_RECORDS" })
void verifyResumptionTokenFlow_whenVerbListRecordsAndMetadataPrefixMarc21WithHoldings(VerbType verb) {
    final String currentValue = System.getProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE);
    System.setProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE, "4");
    RequestSpecification request = createBaseRequest().with().param(VERB_PARAM, verb.value()).param(FROM_PARAM, DATE_INVENTORY_10_INSTANCE_IDS).param(METADATA_PREFIX_PARAM, MetadataPrefix.MARC21WITHHOLDINGS.getName());
    OAIPMH oaipmh = verify200WithXml(request, verb);
    verifyListResponse(oaipmh, verb, 4);
    ResumptionTokenType resumptionToken = getResumptionToken(oaipmh, verb);
    assertThat(resumptionToken, is(notNullValue()));
    assertThat(resumptionToken.getValue(), is(notNullValue()));
    assertEquals(0, resumptionToken.getCursor().intValue());
    List<HeaderType> totalRecords = getHeadersListDependOnVerbType(verb, oaipmh);
    resumptionToken = makeResumptionTokenRequestsAndVerifyCount(totalRecords, resumptionToken, verb, 4, 4);
    resumptionToken = makeResumptionTokenRequestsAndVerifyCount(totalRecords, resumptionToken, verb, 2, 8);
    assertThat(resumptionToken.getValue(), is(isEmptyString()));
    assertThat(totalRecords.size(), is(10));
    System.setProperty(REPOSITORY_MAX_RECORDS_PER_RESPONSE, currentValue);
}
Also used : OAIPMH(org.openarchives.oai._2.OAIPMH) ResumptionTokenType(org.openarchives.oai._2.ResumptionTokenType) HeaderType(org.openarchives.oai._2.HeaderType) RequestSpecification(io.restassured.specification.RequestSpecification) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

HeaderType (org.openarchives.oai._2.HeaderType)6 RequestSpecification (io.restassured.specification.RequestSpecification)5 OAIPMH (org.openarchives.oai._2.OAIPMH)5 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)4 Matchers.isEmptyString (org.hamcrest.Matchers.isEmptyString)4 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)4 EnumSource (org.junit.jupiter.params.provider.EnumSource)3 ResumptionTokenType (org.openarchives.oai._2.ResumptionTokenType)3 Instant (java.time.Instant)2 LocalDateTime (java.time.LocalDateTime)2 DataFieldType (gov.loc.marc21.slim.DataFieldType)1 SubfieldatafieldType (gov.loc.marc21.slim.SubfieldatafieldType)1 RestAssured (io.restassured.RestAssured)1 RestAssured.given (io.restassured.RestAssured.given)1 DecoderConfig (io.restassured.config.DecoderConfig)1 ContentDecoder (io.restassured.config.DecoderConfig.ContentDecoder)1 RestAssuredConfig (io.restassured.config.RestAssuredConfig)1 ContentType (io.restassured.http.ContentType)1 Header (io.restassured.http.Header)1 ValidatableResponse (io.restassured.response.ValidatableResponse)1