Search in sources :

Example 61 with Education

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

the class ActivityValidatorTest method validateEducation_invalidPutCodeTest.

@Test(expected = InvalidPutCodeException.class)
public void validateEducation_invalidPutCodeTest() {
    Education education = getEducation();
    education.setPutCode(1L);
    activityValidator.validateAffiliation(education, null, true, true, Visibility.PUBLIC);
}
Also used : Education(org.orcid.jaxb.model.v3.dev1.record.Education) Test(org.junit.Test)

Example 62 with Education

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

the class ActivityValidatorTest method getEducation.

public Education getEducation() {
    Education education = new Education();
    education.setDepartmentName("department name");
    education.setEndDate(getFuzzyDate());
    education.setOrganization(getOrganization());
    education.setRoleTitle("role");
    education.setStartDate(getFuzzyDate());
    education.setVisibility(Visibility.PUBLIC);
    return education;
}
Also used : Education(org.orcid.jaxb.model.v3.dev1.record.Education)

Example 63 with Education

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

the class ActivityValidatorTest method validateEducation_validEducationTest.

@Test
public void validateEducation_validEducationTest() {
    Education education = getEducation();
    activityValidator.validateAffiliation(education, null, true, true, Visibility.PUBLIC);
}
Also used : Education(org.orcid.jaxb.model.v3.dev1.record.Education) Test(org.junit.Test)

Example 64 with Education

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

the class AffiliationsManagerTest method getEducation.

private Education getEducation() {
    Education element = new Education();
    fillAffiliation(element);
    return element;
}
Also used : Education(org.orcid.jaxb.model.v3.dev1.record.Education)

Example 65 with Education

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

the class AffiliationsManagerTest method testAddEducationToClaimedRecordPreserveUserDefaultVisibility.

@Test
public void testAddEducationToClaimedRecordPreserveUserDefaultVisibility() {
    when(sourceManager.retrieveSourceEntity()).thenReturn(new SourceEntity(new ClientDetailsEntity(CLIENT_1_ID)));
    Education element = getEducation();
    element = affiliationsManager.createEducationAffiliation(claimedOrcid, element, true);
    element = affiliationsManager.getEducationAffiliation(claimedOrcid, element.getPutCode());
    assertNotNull(element);
    assertEquals(Visibility.LIMITED, element.getVisibility());
}
Also used : ClientDetailsEntity(org.orcid.persistence.jpa.entities.ClientDetailsEntity) Education(org.orcid.jaxb.model.v3.dev1.record.Education) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) Test(org.junit.Test) BaseTest(org.orcid.core.BaseTest)

Aggregations

Education (org.orcid.jaxb.model.v3.dev1.record.Education)54 Test (org.junit.Test)46 DBUnitTest (org.orcid.test.DBUnitTest)23 Response (javax.ws.rs.core.Response)22 Employment (org.orcid.jaxb.model.v3.dev1.record.Employment)12 Distinction (org.orcid.jaxb.model.v3.dev1.record.Distinction)11 Membership (org.orcid.jaxb.model.v3.dev1.record.Membership)11 Service (org.orcid.jaxb.model.v3.dev1.record.Service)11 InvitedPosition (org.orcid.jaxb.model.v3.dev1.record.InvitedPosition)10 Qualification (org.orcid.jaxb.model.v3.dev1.record.Qualification)10 EducationSummary (org.orcid.jaxb.model.v3.dev1.record.summary.EducationSummary)9 Affiliation (org.orcid.jaxb.model.v3.dev1.record.Affiliation)8 ResearcherUrl (org.orcid.jaxb.model.v3.dev1.record.ResearcherUrl)8 ActivitiesSummary (org.orcid.jaxb.model.v3.dev1.record.summary.ActivitiesSummary)7 Funding (org.orcid.jaxb.model.v3.dev1.record.Funding)6 Work (org.orcid.jaxb.model.v3.dev1.record.Work)6 OrgAffiliationRelationEntity (org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity)6 Address (org.orcid.jaxb.model.v3.dev1.record.Address)5 ExternalID (org.orcid.jaxb.model.v3.dev1.record.ExternalID)5 Keyword (org.orcid.jaxb.model.v3.dev1.record.Keyword)5