[CST-5799] Fixed OrcidPublicationDataProviderIT tests

This commit is contained in:
Luca Giamminonni
2022-06-17 14:00:18 +02:00
parent 7b816b6150
commit 7828190bd8

View File

@@ -167,8 +167,7 @@ public class OrcidPublicationDataProviderIT extends AbstractIntegrationTestWithD
assertThat(metadata, has(metadata("dc.contributor.author", "John White")));
assertThat(metadata, has(metadata("dc.contributor.editor", "Jesse Pinkman")));
assertThat(metadata, has(metadata("dc.title", "Another cautionary tale.")));
assertThat(metadata, has(metadata("dc.type", "Controlled Vocabulary for "
+ "Resource Type Genres::text::periodical::journal")));
assertThat(metadata, has(metadata("dc.type", "Article")));
ExternalDataObject thirdObject = externalObjects.get(2);
assertThat(thirdObject.getDisplayValue(), is("Branch artery occlusion in a young woman."));
@@ -180,8 +179,7 @@ public class OrcidPublicationDataProviderIT extends AbstractIntegrationTestWithD
assertThat(metadata, hasSize(3));
assertThat(metadata, has(metadata("dc.date.issued", "1985-07-01")));
assertThat(metadata, has(metadata("dc.title", "Branch artery occlusion in a young woman.")));
assertThat(metadata, has(metadata("dc.type", "Controlled Vocabulary for "
+ "Resource Type Genres::text::periodical::journal")));
assertThat(metadata, has(metadata("dc.type", "Article")));
verify(orcidClientMock).getReadPublicAccessToken();
verify(orcidClientMock).getWorks(ACCESS_TOKEN, ORCID);
@@ -327,8 +325,7 @@ public class OrcidPublicationDataProviderIT extends AbstractIntegrationTestWithD
assertThat(metadata, has(metadata("dc.contributor.author", "John White")));
assertThat(metadata, has(metadata("dc.contributor.editor", "Jesse Pinkman")));
assertThat(metadata, has(metadata("dc.title", "Another cautionary tale.")));
assertThat(metadata, has(metadata("dc.type", "Controlled Vocabulary for "
+ "Resource Type Genres::text::periodical::journal")));
assertThat(metadata, has(metadata("dc.type", "Article")));
verify(orcidClientMock).getReadPublicAccessToken();
verify(orcidClientMock).getObject(ACCESS_TOKEN, ORCID, "277902", Work.class);