use of org.orcid.jaxb.model.message.ResearcherUrl in project ORCID-Source by ORCID.
the class JpaJaxbEntityAdapterToOrcidProfileTest method checkOrcidProfile.
private void checkOrcidProfile(OrcidBio orcidBio) {
checkPersonalDetails(orcidBio.getPersonalDetails());
assertNotNull(orcidBio.getContactDetails());
checkContactDetails(orcidBio.getContactDetails());
assertNotNull(orcidBio.getExternalIdentifiers());
checkExternalIdentifiers(orcidBio.getExternalIdentifiers());
assertNotNull(orcidBio.getDelegation());
checkDelegation(orcidBio.getDelegation());
assertNull(orcidBio.getScope());
// Applications are not linked with OrcidProfile object anymore.
// assertNotNull(orcidBio.getApplications());
// checkApplications(orcidBio.getApplications());
ResearcherUrls researcherUrls = orcidBio.getResearcherUrls();
List<ResearcherUrl> urls = researcherUrls.getResearcherUrl();
Collections.sort(urls);
assertEquals(6, urls.size());
Url url1 = urls.get(0).getUrl();
String url1Name = urls.get(0).getUrlName().getContent();
assertEquals(url1Name, "443_1");
assertEquals("http://www.researcherurl2.com?id=1", url1.getValue());
Url url2 = urls.get(1).getUrl();
String url2Name = urls.get(1).getUrlName().getContent();
assertEquals(url2Name, "443_2");
assertEquals("http://www.researcherurl2.com?id=2", url2.getValue());
Url url3 = urls.get(2).getUrl();
String url3Name = urls.get(2).getUrlName().getContent();
assertEquals(url3Name, "443_3");
assertEquals("http://www.researcherurl2.com?id=5", url3.getValue());
Url url4 = urls.get(3).getUrl();
String url4Name = urls.get(3).getUrlName().getContent();
assertEquals(url4Name, "443_4");
assertEquals("http://www.researcherurl2.com?id=6", url4.getValue());
Url url5 = urls.get(4).getUrl();
String url5Name = urls.get(4).getUrlName().getContent();
assertEquals(url5Name, "443_5");
assertEquals("http://www.researcherurl2.com?id=7", url5.getValue());
Url url6 = urls.get(5).getUrl();
String url6Name = urls.get(5).getUrlName().getContent();
assertEquals(url6Name, "443_6");
assertEquals("http://www.researcherurl2.com?id=8", url6.getValue());
checkKeywords(orcidBio.getKeywords());
}
Aggregations