Example #1
0
 public void Equals_ReturnsExpected(HtmlText text, object other, bool expected)
 {
     if (other is HtmlText || other == null)
     {
         Assert.Equal(expected, text.GetHashCode().Equals(other?.GetHashCode()));
         Assert.Equal(expected, text.Equals((HtmlText)other));
     }
     Assert.Equal(expected, text.Equals(other));
 }
Example #2
0
 public void Equals_ReturnsExpected(HtmlText text, object other, bool expected)
 {
     if (other is HtmlText || other == null)
     {
         Assert.Equal(expected, text.GetHashCode().Equals(other?.GetHashCode()));
         Assert.Equal(expected, text.Equals((HtmlText)other));
     }
     Assert.Equal(expected, text.Equals(other));
 }