Exemple #1
0
 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()));
     }
 }
Exemple #2
0
 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()));
     }
 }
Exemple #3
0
        public void GetHashCode_NullBaseDesignerTypeName_ThrowsNullReferenceExeption()
        {
            var attribute = new DesignerAttribute("designerTypeName", (string)null);

            Assert.Throws <NullReferenceException>(() => attribute.GetHashCode());
        }