@Test public void testEmptyEmail() { OtherNames sifOtherNames = new OtherNames(); sifOtherNames.add(new Name()); List<OtherName> result = converter.convert(sifOtherNames); Assert.assertEquals(1, result.size()); OtherName sliOtherName = result.get(0); Assert.assertNull(sliOtherName.getOtherNameType()); Assert.assertNotNull(sliOtherName.getFirstName()); Assert.assertEquals(defaultName, sliOtherName.getFirstName()); Assert.assertNotNull(sliOtherName.getLastSurname()); Assert.assertEquals(defaultName, sliOtherName.getLastSurname()); Assert.assertNull(sliOtherName.getMiddleName()); Assert.assertNull(sliOtherName.getPersonalTitlePrefix()); Assert.assertNull(sliOtherName.getGenerationCodeSuffix()); }
public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; } }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  List<OtherName> convert(OtherNames sifOtherNames); void setNameConverter(NameConverter nameConverter); }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  List<OtherName> convert(OtherNames sifOtherNames); void setNameConverter(NameConverter nameConverter);  }