public void TestHashCodeWhenNoMessageIdAssigned() { NmsMessage message1 = factory.CreateMessage(); NmsMessage message2 = factory.CreateMessage(); Assert.AreNotEqual(message1.GetHashCode(), message2.GetHashCode()); Assert.AreEqual(message1.GetHashCode(), message1.GetHashCode()); }
public void TestHashCode() { NmsMessage message = factory.CreateMessage(); message.NMSMessageId = nmsMessageId; Assert.AreEqual(message.NMSMessageId.GetHashCode(), nmsMessageId.GetHashCode()); Assert.AreEqual(message.GetHashCode(), nmsMessageId.GetHashCode()); }