Example #1
0
        public void ComparesNullElementsAsEqual()
        {
            var comparer = EqualityCompare <int?> .Null();

            var objectComparer = comparer as System.Collections.IEqualityComparer;

            Assert.IsTrue(comparer.Equals(null, null));
            Assert.IsTrue(objectComparer.Equals(null, null));
            Assert.AreEqual(comparer.GetHashCode(null), comparer.GetHashCode(null));
            Assert.AreEqual(objectComparer.GetHashCode(null), objectComparer.GetHashCode(null));
        }