private void AssertEquivalent(MemberInfo[] actual, int[] expected) { var actualValues = actual.Filter(m => m.DeclaringType != typeof(object)).Map(m => ((A1Attribute)m.GetCustomAttributes(typeof(A1Attribute), true)[0]).I); actualValues.Sort(); expected.Sort(); Assert.AreEqual(actualValues, expected); }
private void AssertEquivalent(MemberInfo[] actual, int[] expected) { var actualValues = actual.Filter(m => m.DeclaringType != typeof(object)).Map(m => { var arr = (A1Attribute[])m.GetCustomAttributes(typeof(A1Attribute), true); return arr.Length > 0 ? arr[0].I : 0; }).Filter(x => x != 0); actualValues.Sort(); expected.Sort(); Assert.AreEqual(actualValues, expected); }