use of org.orcid.jaxb.model.record_rc2.Name in project ORCID-Source by ORCID.
the class ValidateV2_1SamplesTest method testUnmarshallName.
@Test
public void testUnmarshallName() throws SAXException, URISyntaxException {
Name name = (Name) unmarshallFromPath("/record_2.1/samples/read_samples/name-2.1.xml", Name.class, "/record_2.1/personal-details-2.1.xsd");
assertNotNull(name);
assertNotNull(name.getCreditName());
assertEquals("credit-name", name.getCreditName().getContent());
assertNotNull(name.getFamilyName());
assertEquals("family-name", name.getFamilyName().getContent());
assertNotNull(name.getGivenNames());
assertEquals("given-names", name.getGivenNames().getContent());
assertNotNull(name.getVisibility());
assertEquals(Visibility.PUBLIC, name.getVisibility());
}
use of org.orcid.jaxb.model.record_rc2.Name in project ORCID-Source by ORCID.
the class ValidateV2_1SamplesTest method testMarshallName.
@Test
public void testMarshallName() throws JAXBException, SAXException, URISyntaxException {
Name object = (Name) unmarshallFromPath("/record_2.1/samples/read_samples/name-2.1.xml", Name.class);
marshall(object, "/record_2.1/personal-details-2.1.xsd");
}
use of org.orcid.jaxb.model.record_rc2.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createName.
protected Name createName(Visibility v) {
Name name = new Name();
name.setVisibility(v);
name.setCreditName(new CreditName("Credit Name"));
name.setFamilyName(new FamilyName("Family Name"));
name.setGivenNames(new GivenNames("Given Names"));
return name;
}
use of org.orcid.jaxb.model.record_rc2.Name in project ORCID-Source by ORCID.
the class ValidateV2RC2SamplesTest method testUnmarshallCreditName.
@Test
public void testUnmarshallCreditName() throws SAXException, URISyntaxException {
CreditName creditName = (CreditName) unmarshallFromPath("/record_2.0_rc2/samples/credit-name-2.0_rc2.xml", CreditName.class, "/record_2.0_rc2/personal-details-2.0_rc2.xsd");
assertNotNull(creditName);
assertEquals("credit-name", creditName.getContent());
assertEquals(Visibility.PUBLIC.value(), creditName.getVisibility().value());
}
use of org.orcid.jaxb.model.record_rc2.Name in project ORCID-Source by ORCID.
the class ValidateV2RC2SamplesTest method testMarshallName.
@Test
public void testMarshallName() throws JAXBException, SAXException, URISyntaxException {
Name object = (Name) unmarshallFromPath("/record_2.0_rc2/samples/name-2.0_rc2.xml", Name.class);
marshall(object, "/record_2.0_rc2/personal-details-2.0_rc2.xsd");
}
Aggregations