I have a number of nested complex objects that I'm attempting to compare with Fluent Assertions with the following code:
restResponse.Should().BeEquivalentTo(mappedSoapResponse, options =>
{
options.AllowingInfiniteRecursion();
options.IgnoringCyclicReferences();
return options;
});
Despite this however I keep hitting an issue with "Maximum recursion depth was reached…" despite specially enabling infinite recursion.
Have you tried adding this beforehand
AssertionOptions.FormattingOptions.MaxDepth = 100;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With