Esempio n. 1
0
        public void TestEquals()
        {
            var treeSpan = new TreeSpan(50, 50);

            Assert.False(treeSpan.Equals(new object()));
            Assert.False(treeSpan.Equals(null));
            Assert.False(treeSpan.Equals((object)TreeSpan.Invalid));
            Assert.True(treeSpan.Equals((object)new TreeSpan(50, 50)));
        }
Esempio n. 2
0
        public void TestIEquatable()
        {
            IEquatable <TreeSpan> treeSpan = TreeSpan.Invalid;

            Assert.True(treeSpan.Equals(TreeSpan.Invalid));

            treeSpan = new TreeSpan(50, 50);
            Assert.True(treeSpan.Equals(TreeSpan.FromBounds(50, 100)));
        }