public void Unequal_Null_Path() { var a = new IndexPath(null); var b = new IndexPath(2); Assert.False(a == b); Assert.True(a != b); Assert.False(a.Equals(b)); Assert.Equal(-1, a.CompareTo(b)); Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); }
public void Default_Is_Null_Path() { var a = new IndexPath(null); var b = default(IndexPath); Assert.True(a == b); Assert.False(a != b); Assert.True(a.Equals(b)); Assert.Equal(0, a.CompareTo(b)); Assert.Equal(a.GetHashCode(), b.GetHashCode()); }
public void Equal_Paths() { var a = new IndexPath(1); var b = new IndexPath(1); Assert.True(a == b); Assert.False(a != b); Assert.True(a.Equals(b)); Assert.Equal(0, a.CompareTo(b)); Assert.Equal(a.GetHashCode(), b.GetHashCode()); }