public void Execute <T>(object[] subject, T[] expectation) { if (AssertIsNotNull(expectation, subject) && AssertCollectionsHaveSameCount(subject, expectation)) { if (Recursive) { using var _ = context.TraceBlock(path => $"Structurally comparing {subject} and expectation {expectation} at {path}"); AssertElementGraphEquivalency(subject, expectation); } else { using var _ = context.TraceBlock(path => $"Comparing subject {subject} and expectation {expectation} at {path} using simple value equality"); subject.Should().BeEquivalentTo(expectation); } } }
public void Execute <T>(object[] subject, T[] expectation) { if (AssertIsNotNull(expectation, subject) && AssertLengthEquality(subject.Length, expectation.Length)) { if (Recursive) { using (context.TraceBlock(path => $"Structurally comparing {subject} and expectation {expectation} at {path}")) { AssertElementGraphEquivalency(subject, expectation); } } else { using (context.TraceBlock(path => $"Comparing subject {subject} and expectation {expectation} at {path} using simple value equality")) { subject.Should().BeEquivalentTo(expectation); } } } }