Example #1
0
        public void GetHashCode_EqualObjects_OrderOfWrappedProtectedMembersIsIrrelevant()
        {
            var one = new ConcreteMixinTypeIdentifier(
                typeof(BT1Mixin1),
                new HashSet <MethodInfo> {
                _overrider1, _overrider2
            },
                new HashSet <MethodInfo> {
                _overridden1, _overridden2
            });
            var two = new ConcreteMixinTypeIdentifier(
                typeof(BT1Mixin1),
                new HashSet <MethodInfo> {
                _overrider1, _overrider2
            },
                new HashSet <MethodInfo> {
                _overridden2, _overridden1
            });

            Assert.That(one.GetHashCode(), Is.EqualTo(two.GetHashCode()));
        }
Example #2
0
        public void GetHashCode_EqualObjects()
        {
            var one = new ConcreteMixinTypeIdentifier(
                typeof(BT1Mixin1),
                new HashSet <MethodInfo> {
                _overrider1, _overrider2
            },
                new HashSet <MethodInfo> {
                _overridden1, _overridden2
            });
            var two = new ConcreteMixinTypeIdentifier(
                typeof(BT1Mixin1),
                new HashSet <MethodInfo> {
                _overrider1, _overrider2
            },
                new HashSet <MethodInfo> {
                _overridden1, _overridden2
            });

            Assert.That(one.GetHashCode(), Is.EqualTo(two.GetHashCode()));
        }