use of org.openarchives.oai._2.VerbType.GET_RECORD in project mod-oai-pmh by folio-org.
the class OaiPmhImplTest method getOaiGetRecordVerbWithExistingIdentifier.
@ParameterizedTest
@EnumSource(MetadataPrefix.class)
void getOaiGetRecordVerbWithExistingIdentifier(MetadataPrefix metadataPrefix) {
String identifier = IDENTIFIER_PREFIX + OkapiMockServer.EXISTING_IDENTIFIER;
RequestSpecification request = createBaseRequest().with().param(VERB_PARAM, GET_RECORD.value()).param(IDENTIFIER_PARAM, identifier).param(METADATA_PREFIX_PARAM, metadataPrefix.getName());
OAIPMH oaiPmhResponseWithExistingIdentifier = verify200WithXml(request, GET_RECORD);
HeaderType recordHeader = oaiPmhResponseWithExistingIdentifier.getGetRecord().getRecord().getHeader();
verifyIdentifiers(Collections.singletonList(recordHeader), Collections.singletonList("00000000-0000-4a89-a2f9-78ce3145e4fc"));
assertThat(oaiPmhResponseWithExistingIdentifier.getGetRecord(), is(notNullValue()));
assertThat(oaiPmhResponseWithExistingIdentifier.getErrors(), is(empty()));
}
Aggregations