public void ExtractNameString() { Assert.Null(NameUtil.extractNameString(null)); Assert.Null(NameUtil.extractNameString("")); Assert.Null(NameUtil.extractNameString(" ")); Assert.Null(NameUtil.extractNameString(" ")); Assert.Null(NameUtil.extractNameString(" *^*& ")); Assert.Null(NameUtil.extractNameString("123")); Assert.Null(NameUtil.extractNameString(" 123 ")); Assert.Equal("a", NameUtil.extractNameString("a")); Assert.Equal("a", NameUtil.extractNameString(" a")); Assert.Equal("a", NameUtil.extractNameString("a ")); Assert.Equal("a", NameUtil.extractNameString("a--")); Assert.Equal("a", NameUtil.extractNameString("a//")); Assert.Equal("a", NameUtil.extractNameString("--a ")); Assert.Equal("jimbo", NameUtil.extractNameString("jimbo1")); Assert.Equal("jimbo", NameUtil.extractNameString("$%^$^jimbo1)()*(&&++=")); Assert.Equal("jimbo", NameUtil.extractNameString(" jimbo ")); Assert.Equal("jimbo", NameUtil.extractNameString("1j1i1m1bo1")); Assert.Equal("jimbo", NameUtil.extractNameString("jimbo")); Assert.Equal("o'clark", NameUtil.extractNameString("o'clark")); Assert.Equal("o'clark", NameUtil.extractNameString("o'''clark")); Assert.Equal("jimbo otto", NameUtil.extractNameString("jimbo otto")); Assert.Equal("jimbo otto", NameUtil.extractNameString(" jimbo otto ")); Assert.Equal("jimbo otto", NameUtil.extractNameString("jimbo otto")); Assert.Equal("jimbo otto", NameUtil.extractNameString("jimbo otto")); Assert.Equal("jimbo otto", NameUtil.extractNameString("jimbo - otto")); Assert.Equal("jimbo otto", NameUtil.extractNameString("jimbo / otto")); Assert.Equal("jimbo-otto", NameUtil.extractNameString("jimbo-otto")); Assert.Equal("jimbo-otto", NameUtil.extractNameString("jimbo--otto")); Assert.Equal("jimbo-otto", NameUtil.extractNameString("-jimbo-otto-")); }