Skip to content

Commit

Permalink
DSC-1458 fix test to reflect the fact that enhanced metadata are alwa…
Browse files Browse the repository at this point in the history
…ys included also for external authors
  • Loading branch information
abollini committed Jan 19, 2024
1 parent 76c42ee commit cdcd959
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void testWorkbookBuildingFromItemDtos() throws Exception {

Item firstItem = getItemFromMessage(handler.getInfoMessages().get(7));
assertThat(firstItem, notNullValue());
assertThat(firstItem.getMetadata(), hasSize(14));
assertThat(firstItem.getMetadata(), hasSize(16));
assertThat(firstItem.getMetadata(), hasItems(
with("dc.title", "Test Publication"),
with("dc.date.issued", "2020/02/15"),
Expand All @@ -227,7 +227,7 @@ public void testWorkbookBuildingFromItemDtos() throws Exception {

Item secondItem = getItemFromMessage(handler.getInfoMessages().get(10));
assertThat(secondItem, notNullValue());
assertThat(secondItem.getMetadata(), hasSize(14));
assertThat(secondItem.getMetadata(), hasSize(16));
assertThat(secondItem.getMetadata(), hasItems(
with("dc.title", "Second Publication"),
with("dc.date.issued", "2022/02/15"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ public void testRunHarvestWithPublicationAndThenPerson() throws Exception {
Item publication = publications.get(0);

List<MetadataValue> values = publication.getMetadata();
assertThat(values, hasSize(17));
assertThat(values, hasSize(19));

assertThat(values, hasItems(with("dc.title", "Test Publication")));
assertThat(values, hasItems(with("dc.type", "Controlled Vocabulary for Resource Type Genres::text")));
Expand Down Expand Up @@ -859,7 +859,7 @@ public void testRunHarvestWithPersonAndThenPublication() throws Exception {
Item person = findItemByOaiID("oai:test-harvest:Persons/123", personCollection);

List<MetadataValue> values = person.getMetadata();
assertThat(values, hasSize(12));
assertThat(values, hasSize(14));
assertThat(values, hasItems(with("dc.title", "Manghi, Paolo")));
assertThat(values, hasItems(with("cris.sourceId", "test-harvest::123")));
assertThat(values, hasItems(with("dspace.entity.type", "Person")));
Expand Down

0 comments on commit cdcd959

Please sign in to comment.