@Test public void shouldMapSifNameToSliName() { Name sliName = converter.convert(createSifName(prefixes.get(0), suffixes.get(0))); Assert.assertNotNull(sliName); Assert.assertEquals("Incorrect prefix mapping", prefixes.get(0), sliName.getPersonalTitlePrefix()); Assert.assertEquals("Incorrect firstName mapping", firstName, sliName.getFirstName()); Assert.assertEquals("Incorrect lastName mapping", lastName, sliName.getLastSurname()); Assert.assertEquals("Incorrect middleName mapping", middleName, sliName.getMiddleName()); Assert.assertEquals("Incorrect suffix", suffixes.get(0), sliName.getGenerationCodeSuffix()); for (String prefix : prefixes) { sliName = converter.convert(createSifName(prefix, suffixes.get(0))); Assert.assertNotNull(sliName); Assert.assertEquals("Incorrect prefix mapping", prefix, sliName.getPersonalTitlePrefix()); } for (String suffix : suffixes) { sliName = converter.convert(createSifName(prefixes.get(0), suffix)); Assert.assertNotNull(sliName); Assert.assertEquals("Incorrect suffix", suffix, sliName.getGenerationCodeSuffix()); } sliName = converter.convert(createSifName("unsupported", suffixes.get(0))); Assert.assertNotNull(sliName); Assert.assertNull("Unsupported prefix should map to null", sliName.getPersonalTitlePrefix()); sliName = converter.convert(createSifName(prefixes.get(0), "unsupported")); Assert.assertNotNull(sliName); Assert.assertNull("Unsupported suffix should map to null", sliName.getGenerationCodeSuffix()); }
public Name convert(openadk.library.common.Name sifName) { if (sifName == null) { return null; } Name sliName = new Name(); mapSifNameIntoSliName(sifName, sliName); return sliName; }
NameConverter { public Name convert(openadk.library.common.Name sifName) { if (sifName == null) { return null; } Name sliName = new Name(); mapSifNameIntoSliName(sifName, sliName); return sliName; } }
NameConverter { public Name convert(openadk.library.common.Name sifName) { if (sifName == null) { return null; } Name sliName = new Name(); mapSifNameIntoSliName(sifName, sliName); return sliName; }  }
NameConverter { public Name convert(openadk.library.common.Name sifName) { if (sifName == null) { return null; } Name sliName = new Name(); mapSifNameIntoSliName(sifName, sliName); return sliName; }  Name convert(openadk.library.common.Name sifName); void mapSifNameIntoSliName(openadk.library.common.Name sifName, Name sliName); }
NameConverter { public Name convert(openadk.library.common.Name sifName) { if (sifName == null) { return null; } Name sliName = new Name(); mapSifNameIntoSliName(sifName, sliName); return sliName; }  Name convert(openadk.library.common.Name sifName); void mapSifNameIntoSliName(openadk.library.common.Name sifName, Name sliName);  }