public void Equals_Object_ReturnsExpected(DesignerAttribute attribute, object other, bool expected) { Assert.Equal(expected, attribute.Equals(other)); if (other is DesignerAttribute) { Assert.Equal(expected, attribute.GetHashCode().Equals(other.GetHashCode())); } }
public void Equals_Object_ReturnsExpected(DesignerAttribute attribute, object other, bool expected) { Assert.Equal(expected, attribute.Equals(other)); if (other is DesignerAttribute otherAttribute && attribute.DesignerBaseTypeName != null && otherAttribute.DesignerBaseTypeName != null) { Assert.Equal(expected, attribute.GetHashCode().Equals(other.GetHashCode())); } }