use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateEmploymentWithoutDisambiguatedOrgId.
@Test(expected = InvalidDisambiguatedOrgException.class)
public void validateEmploymentWithoutDisambiguatedOrgId() {
Employment e = getEmployment();
e.getOrganization().getDisambiguatedOrganization().setDisambiguatedOrganizationIdentifier(null);
activityValidator.validateAffiliation(e, null, false, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateEmployment_validEmploymentTest.
/**
* VALIDATE AFFILIATIONS
*/
@Test
public void validateEmployment_validEmploymentTest() {
Employment employment = getEmployment();
activityValidator.validateAffiliation(employment, null, true, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateEmployment_invalidPutCodeTest.
@Test(expected = InvalidPutCodeException.class)
public void validateEmployment_invalidPutCodeTest() {
Employment employment = getEmployment();
employment.setPutCode(1L);
activityValidator.validateAffiliation(employment, null, true, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateEmploymentWithoutDisambiguatedOrg.
@Test(expected = InvalidDisambiguatedOrgException.class)
public void validateEmploymentWithoutDisambiguatedOrg() {
Employment e = getEmployment();
e.getOrganization().setDisambiguatedOrganization(null);
activityValidator.validateAffiliation(e, null, false, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class AffiliationsManagerTest method testAddEmploymentToClaimedRecordPreserveUserDefaultVisibility.
@Test
public void testAddEmploymentToClaimedRecordPreserveUserDefaultVisibility() {
when(sourceManager.retrieveSourceEntity()).thenReturn(new SourceEntity(new ClientDetailsEntity(CLIENT_1_ID)));
Employment element = getEmployment();
element = affiliationsManager.createEmploymentAffiliation(claimedOrcid, element, true);
element = affiliationsManager.getEmploymentAffiliation(claimedOrcid, element.getPutCode());
assertNotNull(element);
assertEquals(Visibility.LIMITED, element.getVisibility());
}
Aggregations