private string[] TryToMatch(object subject, object expectation, int expectationIndex) { using (var scope = new AssertionScope()) { parent.AssertEqualityUsing(context.CreateForCollectionItem(expectationIndex, subject, expectation)); return(scope.Discard()); } }
private void EnumerateElements(EquivalencyValidationContext context, object[] subject, object[] expectation, IEquivalencyValidator parent) { if (!subject.SequenceEqual(expectation)) { for (int i = 0; i < subject.Length; i++) { parent.AssertEqualityUsing(context.CreateForCollectionItem(i, subject[i], expectation[i])); } } }