Search in sources :

Example 36 with PersonalDetails

use of org.orcid.jaxb.model.v3.dev1.record.PersonalDetails in project ORCID-Source by ORCID.

the class PersonalDetailsManagerTest method getPublicPersonalDetailsTest2.

@Test
public void getPublicPersonalDetailsTest2() {
    PersonalDetails personalDetails = personalDetailsManager.getPublicPersonalDetails(ORCID2);
    assertNotNull(personalDetails);
    assertNotNull(personalDetails.getOtherNames());
    assertTrue(personalDetails.getOtherNames().getOtherNames().isEmpty());
    assertNull(personalDetails.getBiography());
    assertNull(personalDetails.getName());
}
Also used : PersonalDetails(org.orcid.jaxb.model.v3.dev1.record.PersonalDetails) Test(org.junit.Test) BaseTest(org.orcid.core.BaseTest)

Example 37 with PersonalDetails

use of org.orcid.jaxb.model.v3.dev1.record.PersonalDetails in project ORCID-Source by ORCID.

the class PersonalDetailsManagerTest method getPublicPersonalDetailsTest.

@Test
public void getPublicPersonalDetailsTest() {
    PersonalDetails personalDetails = personalDetailsManager.getPublicPersonalDetails(ORCID1);
    assertNotNull(personalDetails);
    assertNotNull(personalDetails.getOtherNames());
    assertNotNull(personalDetails.getOtherNames().getOtherNames());
    assertEquals(1, personalDetails.getOtherNames().getOtherNames().size());
    assertEquals(Long.valueOf(18), personalDetails.getOtherNames().getOtherNames().get(0).getPutCode());
    assertNull(personalDetails.getBiography());
    assertNull(personalDetails.getName());
}
Also used : PersonalDetails(org.orcid.jaxb.model.v3.dev1.record.PersonalDetails) Test(org.junit.Test) BaseTest(org.orcid.core.BaseTest)

Example 38 with PersonalDetails

use of org.orcid.jaxb.model.v3.dev1.record.PersonalDetails in project ORCID-Source by ORCID.

the class PersonalDetailsManagerTest method getPublicPersonalDetailsTest3.

@Test
public void getPublicPersonalDetailsTest3() {
    PersonalDetails personalDetails = personalDetailsManager.getPublicPersonalDetails(ORCID3);
    assertNotNull(personalDetails);
    assertNotNull(personalDetails.getOtherNames());
    assertNotNull(personalDetails.getOtherNames().getOtherNames());
    assertEquals(1, personalDetails.getOtherNames().getOtherNames().size());
    assertEquals(Long.valueOf(13), personalDetails.getOtherNames().getOtherNames().get(0).getPutCode());
    assertNotNull(personalDetails.getBiography());
    assertEquals(Visibility.PUBLIC, personalDetails.getBiography().getVisibility());
    assertEquals("Biography for 0000-0000-0000-0003", personalDetails.getBiography().getContent());
    assertNotNull(personalDetails.getName());
    assertEquals("Credit Name", personalDetails.getName().getCreditName().getContent());
    assertEquals("Family Name", personalDetails.getName().getFamilyName().getContent());
    assertEquals("Given Names", personalDetails.getName().getGivenNames().getContent());
    assertEquals(Visibility.PUBLIC, personalDetails.getName().getVisibility());
}
Also used : PersonalDetails(org.orcid.jaxb.model.v3.dev1.record.PersonalDetails) Test(org.junit.Test) BaseTest(org.orcid.core.BaseTest)

Aggregations

PersonalDetails (org.orcid.jaxb.model.v3.dev1.record.PersonalDetails)32 Test (org.junit.Test)28 OtherName (org.orcid.jaxb.model.v3.dev1.record.OtherName)19 Biography (org.orcid.jaxb.model.v3.dev1.record.Biography)15 OtherNames (org.orcid.jaxb.model.v3.dev1.record.OtherNames)15 Name (org.orcid.jaxb.model.v3.dev1.record.Name)14 BaseTest (org.orcid.core.BaseTest)6 Response (javax.ws.rs.core.Response)4 DBUnitTest (org.orcid.test.DBUnitTest)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 LastModifiedDate (org.orcid.jaxb.model.v3.dev1.common.LastModifiedDate)3 ClientResponse (com.sun.jersey.api.client.ClientResponse)2 InputStreamReader (java.io.InputStreamReader)2 Reader (java.io.Reader)2 Date (java.util.Date)2 BlackBoxBaseV3_0_dev1 (org.orcid.integration.blackbox.api.v3.dev1.BlackBoxBaseV3_0_dev1)2 Address (org.orcid.jaxb.model.v3.dev1.record.Address)2 Distinction (org.orcid.jaxb.model.v3.dev1.record.Distinction)2 Education (org.orcid.jaxb.model.v3.dev1.record.Education)2