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();
}
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();
}
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();
}
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();
}
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);
}
Aggregations