public override string ToString() { if (String.IsNullOrWhiteSpace(ClientIdentifier.Server)) { return(Name); } return(String.Format(CultureInfo.InvariantCulture, "{0} ({1})", Name, ClientIdentifier.ToServerPortString())); }
public void ClientIdentifier_ToServerAndPortString_WithServer() { var identifier = new ClientIdentifier("Foo", "Bar", ClientSettings.NoPort, Guid.Empty); Assert.AreEqual("Bar", identifier.ToServerPortString()); }