Пример #1
0
        public void ReturnsZero()
        {
            var source   = new None();
            var hashCode = source.GetHashCode();

            Assert.Equal(0, hashCode);
        }
Пример #2
0
        public void WhenNone_ReturnsSameAsNone()
        {
            var source = Maybe <object> .None();

            var none = new None();

            Assert.Equal(none.GetHashCode(), source.GetHashCode());
        }
Пример #3
0
        public void IsEqualToHashCodeOfOtherNone()
        {
            var source = new None();
            var other  = new None();

            var sourceHashCode = source.GetHashCode();
            var otherHashCode  = other.GetHashCode();

            Assert.Equal(sourceHashCode, otherHashCode);
        }