public void FormatDisplayNameTest() { var nameFormatter = new NameFormatter(); var homer = new HumanName("Homer", "Simpson", "Jay"); var userName = string.Empty; Assert.Equal( "Homer J. Simpson", nameFormatter.FormatDisplayName("[FIRSTNAME] [O] [LASTNAME]", homer, userName) ); Assert.Equal( "Homer Jay Simpson", nameFormatter.FormatDisplayName("[FIRSTNAME] [OTHERNAME] [LASTNAME]", homer, userName) ); Assert.Equal( "Simpson, H.", nameFormatter.FormatDisplayName("[LASTNAME], [F]", homer, userName) ); }