System.Tests.AttributeGetCustomAttributes.PositiveTest C# (CSharp) Method

PositiveTest() public static method

public static PositiveTest ( Attribute attrs, int expected, string id ) : bool
attrs Attribute
expected int
id string
return bool
        public static bool PositiveTest(Attribute[] attrs, int[] expected, string id)
        {
            bool result = true;
            for (int i = 0; i < attrs.Length; i++)
            {
                if (attrs[i] is TestAttribute)
                {
                    bool found = false;
                    for (int j = 0; j < expected.Length; j++)
                    {
                        if (expected[j] == ((TestAttribute)attrs[i]).TestVal)
                        {
                            found = true;
                            expected[j] = int.MinValue;
                            break;
                        }
                    }
                    if (!found)
                    {
                        result = false;
                    }
                }
            }
            return result;
        }
AttributeGetCustomAttributes