static string FormatMessage( object expectedMessage, string callerName ) { string d = callerName; string tail = expectedMessage != null ? expectedMessage.ToString() : null; if( !string.IsNullOrEmpty( tail ) ) { d += ": expected '" + tail + "'."; } return d; }