Search in sources :

Example 81 with PersonExternalIdentifier

use of org.orcid.jaxb.model.record_rc2.PersonExternalIdentifier in project ORCID-Source by ORCID.

the class PersonValidatorTest method validateExternalIdentifier_invalidUrl_nullUrlTest.

@Test(expected = OrcidValidationException.class)
public void validateExternalIdentifier_invalidUrl_nullUrlTest() {
    PersonExternalIdentifier extId = getPersonExternalIdentifier();
    extId.setUrl(null);
    PersonValidator.validateExternalIdentifier(extId, getSourceEntity(), true, true, Visibility.PUBLIC, true);
    fail();
}
Also used : PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier) Test(org.junit.Test)

Example 82 with PersonExternalIdentifier

use of org.orcid.jaxb.model.record_rc2.PersonExternalIdentifier in project ORCID-Source by ORCID.

the class PersonValidatorTest method validateExternalIdentifier_invalidRelationship1_flagOnTest.

@Test(expected = OrcidValidationException.class)
public void validateExternalIdentifier_invalidRelationship1_flagOnTest() {
    PersonExternalIdentifier extId = getPersonExternalIdentifier();
    extId.setRelationship(null);
    PersonValidator.validateExternalIdentifier(extId, getSourceEntity(), true, true, Visibility.PUBLIC, true);
    fail();
}
Also used : PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier) Test(org.junit.Test)

Example 83 with PersonExternalIdentifier

use of org.orcid.jaxb.model.record_rc2.PersonExternalIdentifier in project ORCID-Source by ORCID.

the class PersonValidatorTest method validateExternalIdentifier_visibilityDoesntChangeTest.

@Test(expected = VisibilityMismatchException.class)
public void validateExternalIdentifier_visibilityDoesntChangeTest() {
    PersonExternalIdentifier extId = getPersonExternalIdentifier();
    extId.setPutCode(1L);
    extId.setVisibility(Visibility.LIMITED);
    PersonValidator.validateExternalIdentifier(extId, getSourceEntity(), false, true, Visibility.PUBLIC, true);
    fail();
}
Also used : PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier) Test(org.junit.Test)

Example 84 with PersonExternalIdentifier

use of org.orcid.jaxb.model.record_rc2.PersonExternalIdentifier in project ORCID-Source by ORCID.

the class PersonValidatorTest method validateExternalIdentifier_invalidRelationship2_flagOnTest.

@Test(expected = OrcidValidationException.class)
public void validateExternalIdentifier_invalidRelationship2_flagOnTest() {
    PersonExternalIdentifier extId = getPersonExternalIdentifier();
    extId.setRelationship(Relationship.PART_OF);
    PersonValidator.validateExternalIdentifier(extId, getSourceEntity(), true, true, Visibility.PUBLIC, true);
    fail();
}
Also used : PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier) Test(org.junit.Test)

Example 85 with PersonExternalIdentifier

use of org.orcid.jaxb.model.record_rc2.PersonExternalIdentifier in project ORCID-Source by ORCID.

the class PersonValidatorTest method validateExternalIdentifierTest.

@Test
public void validateExternalIdentifierTest() {
    PersonExternalIdentifier extId = getPersonExternalIdentifier();
    PersonValidator.validateExternalIdentifier(extId, getSourceEntity(), true, true, Visibility.PUBLIC, true);
}
Also used : PersonExternalIdentifier(org.orcid.jaxb.model.record_v2.PersonExternalIdentifier) Test(org.junit.Test)

Aggregations

PersonExternalIdentifier (org.orcid.jaxb.model.record_v2.PersonExternalIdentifier)99 Test (org.junit.Test)91 ResearcherUrl (org.orcid.jaxb.model.record_v2.ResearcherUrl)47 Address (org.orcid.jaxb.model.record_v2.Address)42 Keyword (org.orcid.jaxb.model.record_v2.Keyword)42 PersonExternalIdentifiers (org.orcid.jaxb.model.record_v2.PersonExternalIdentifiers)41 OtherName (org.orcid.jaxb.model.record_v2.OtherName)40 Email (org.orcid.jaxb.model.record_v2.Email)39 OtherNames (org.orcid.jaxb.model.record_v2.OtherNames)33 Biography (org.orcid.jaxb.model.record_v2.Biography)32 Person (org.orcid.jaxb.model.record_v2.Person)32 Addresses (org.orcid.jaxb.model.record_v2.Addresses)31 Emails (org.orcid.jaxb.model.record_v2.Emails)31 Keywords (org.orcid.jaxb.model.record_v2.Keywords)31 ResearcherUrls (org.orcid.jaxb.model.record_v2.ResearcherUrls)31 Name (org.orcid.jaxb.model.record_v2.Name)29 Response (javax.ws.rs.core.Response)19 EducationSummary (org.orcid.jaxb.model.record.summary_v2.EducationSummary)19 EmploymentSummary (org.orcid.jaxb.model.record.summary_v2.EmploymentSummary)19 WorkSummary (org.orcid.jaxb.model.record.summary_v2.WorkSummary)19