コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void ClearProperties()
 {
     message.ClearProperties();
 }