public void TestClearProperties() { NmsMessage msg = factory.CreateMessage(); msg.Properties.SetString("test", "test"); msg.NMSMessageId = nmsMessageId; msg.ClearProperties(); Assert.Null(msg.Properties.GetString("test")); Assert.NotNull(msg.NMSMessageId); }
public void TestClearPropertiesClearsReadOnly() { NmsMessage msg = factory.CreateMessage(); msg.OnDispatch(); Assert.Throws <MessageNotWriteableException>(() => msg.Properties.SetString("test", "test")); Assert.True(msg.IsReadOnlyProperties); msg.ClearProperties(); msg.Properties.SetString("test", "test"); Assert.False(msg.IsReadOnlyProperties); }
public void ClearProperties() { message.ClearProperties(); }