[英]FluentAssertions Recursion Depth Reached in object with recursive structure
[英]Fluent Assertions "Maximum recursion depth was reached…"
我有許多嵌套的復雜對象,我試圖用以下代碼與 Fluent Assertions 進行比較:
restResponse.Should().BeEquivalentTo(mappedSoapResponse, options =>
{
options.AllowingInfiniteRecursion();
options.IgnoringCyclicReferences();
return options;
});
盡管如此,盡管特別啟用了無限遞歸,但我仍然遇到“達到最大遞歸深度......”的問題。
您是否嘗試過預先添加
AssertionOptions.FormattingOptions.MaxDepth = 100;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.