From e7f263a437fb2ebc22cc7f513e17ea224f3184a7 Mon Sep 17 00:00:00 2001 From: Ricky Kaare Engelharth Date: Tue, 5 Sep 2023 12:31:15 +0200 Subject: [PATCH] Fix removal of ThrowingRecursionBehavior --- src/Atc.Test/Customizations/RecursionCustomization.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Atc.Test/Customizations/RecursionCustomization.cs b/src/Atc.Test/Customizations/RecursionCustomization.cs index 02bae6e..aee88da 100644 --- a/src/Atc.Test/Customizations/RecursionCustomization.cs +++ b/src/Atc.Test/Customizations/RecursionCustomization.cs @@ -10,7 +10,9 @@ public class RecursionCustomization : ICustomization public void Customize(IFixture fixture) { fixture?.Behaviors - .Remove(new ThrowingRecursionBehavior()); + .OfType() + .ToList() + .ForEach(b => fixture.Behaviors.Remove(b)); fixture?.Behaviors .Add(new OmitOnRecursionBehavior());