public void TestClearBody()
{
ActiveMQStreamMessage streamMessage = new ActiveMQStreamMessage();
try
{
streamMessage.WriteObject((Int64) 2);
streamMessage.ClearBody();
Assert.IsFalse(streamMessage.ReadOnlyBody);
streamMessage.WriteObject((Int64) 2);
streamMessage.ReadObject();
Assert.Fail("should throw exception");
}
catch(MessageNotReadableException)
{
}
catch(MessageNotWriteableException)
{
Assert.Fail("should be writeable");
}
}