コード例 #1
0
        public void TestHashCodeWhenNoMessageIdAssigned()
        {
            NmsMessage message1 = factory.CreateMessage();
            NmsMessage message2 = factory.CreateMessage();

            Assert.AreNotEqual(message1.GetHashCode(), message2.GetHashCode());
            Assert.AreEqual(message1.GetHashCode(), message1.GetHashCode());
        }
コード例 #2
0
        public void TestHashCode()
        {
            NmsMessage message = factory.CreateMessage();

            message.NMSMessageId = nmsMessageId;
            Assert.AreEqual(message.NMSMessageId.GetHashCode(), nmsMessageId.GetHashCode());
            Assert.AreEqual(message.GetHashCode(), nmsMessageId.GetHashCode());
        }