Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
        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());
        }