Apache.NMS.ActiveMQ.Commands.ActiveMQTextMessage.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            string text = this.Text;

            if(text != null && text.Length > 63)
            {
                text = text.Substring(0, 45) + "..." + text.Substring(text.Length - 12);
            }
            return base.ToString() + " Text = " + (text ?? "null");
        }

Usage Example

 public void TestNullText() 
 {
     ActiveMQTextMessage nullMessage = new ActiveMQTextMessage();
     SetContent(nullMessage, null);
     Assert.IsNull(nullMessage.Text);
     Assert.IsTrue(nullMessage.ToString().Contains("Text = null"));
 }
All Usage Examples Of Apache.NMS.ActiveMQ.Commands.ActiveMQTextMessage::ToString