Search in sources :

Example 1 with PersonNameTypeConverter

use of org.codice.ddf.registry.schemabindings.converter.type.PersonNameTypeConverter in project ddf by codice.

the class PersonNameTypeConverterTest method testConvertFullName.

@Test
public void testConvertFullName() throws Exception {
    PersonNameTypeConverter pntConverter = new PersonNameTypeConverter();
    Optional<PersonNameType> optionalPersonName = pntConverter.convert(personMap);
    assertThat(optionalPersonName, notNullValue());
    assertThat(optionalPersonName.isPresent(), is(true));
    PersonNameType personName = optionalPersonName.get();
    assertThat(personName, notNullValue());
    assertThat(personName.getFirstName(), is(equalTo(FIRST_NAME)));
    assertThat(personName.getMiddleName(), is(equalTo(MIDDLE_NAME)));
    assertThat(personName.getLastName(), is(equalTo(LAST_NAME)));
}
Also used : PersonNameTypeConverter(org.codice.ddf.registry.schemabindings.converter.type.PersonNameTypeConverter) PersonNameType(oasis.names.tc.ebxml_regrep.xsd.rim._3.PersonNameType) Test(org.junit.Test)

Aggregations

PersonNameType (oasis.names.tc.ebxml_regrep.xsd.rim._3.PersonNameType)1 PersonNameTypeConverter (org.codice.ddf.registry.schemabindings.converter.type.PersonNameTypeConverter)1 Test (org.junit.Test)1