use of com.beanit.asn1bean.compiler.modules.module1.Name in project ORCID-Source by ORCID.
the class ValidateV2RC3SamplesTest method testUnmarshallName.
@Test
public void testUnmarshallName() throws SAXException, URISyntaxException {
Name name = (Name) unmarshallFromPath("/record_2.0_rc3/samples/name-2.0_rc3.xml", Name.class, "/record_2.0_rc3/personal-details-2.0_rc3.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 com.beanit.asn1bean.compiler.modules.module1.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 com.beanit.asn1bean.compiler.modules.module1.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 com.beanit.asn1bean.compiler.modules.module1.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 com.beanit.asn1bean.compiler.modules.module1.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