public void GetHashCode_Twice_IsEqual() { var test1 = new LocalInstant(123L); var test2 = new LocalInstant(123L); Assert.AreEqual(test1.GetHashCode(), test1.GetHashCode()); Assert.AreEqual(test2.GetHashCode(), test2.GetHashCode()); }
public void GetHashCode_DifferentTicks_IsDifferent() { var test1 = new LocalInstant(123L); var test2 = new LocalInstant(123L); var test3 = new LocalInstant(321L); Assert.AreNotEqual(test1.GetHashCode(), test3.GetHashCode()); Assert.AreNotEqual(test2.GetHashCode(), test3.GetHashCode()); }