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

Equals_TestData() public static method

public static Equals_TestData ( ) : IEnumerable
return IEnumerable
        public static IEnumerable<object[]> Equals_TestData()
        {
            yield return new object[] { new StringValueAttribute("hello"), new StringValueAttribute("hello"), true, true };
            yield return new object[] { new StringValueAttribute("hello"), new StringValueAttribute("foo"), false, false };

            yield return new object[] { new StringValueIntValueAttribute("hello", 1), new StringValueIntValueAttribute("hello", 1), true, true };
            yield return new object[] { new StringValueIntValueAttribute("hello", 1), new StringValueIntValueAttribute("hello", 2), false, true }; // GetHashCode() ignores the int value

            yield return new object[] { new EmptyAttribute(), new EmptyAttribute(), true, true };

            yield return new object[] { new StringValueAttribute("hello"), new StringValueIntValueAttribute("hello", 1), false, true }; // GetHashCode() ignores the int value
            yield return new object[] { new StringValueAttribute("hello"), "hello", false, false };
            yield return new object[] { new StringValueAttribute("hello"), null, false, false };
        }