System.Tests.AttributeTests.Equals C# (CSharp) Method

Equals() private method

private Equals ( Attribute attr1, object obj, bool expected, bool hashEqualityExpected ) : void
attr1 System.Attribute
obj object
expected bool
hashEqualityExpected bool
return void
        public static void Equals(Attribute attr1, object obj, bool expected, bool hashEqualityExpected)
        {
            Assert.Equal(expected, attr1.Equals(obj));

            Attribute attr2 = obj as Attribute;
            if (attr2 != null)
            {
                Assert.Equal(hashEqualityExpected, attr1.GetHashCode() == attr2.GetHashCode());
            }
        }