diff --git a/test/DivertR.UnitTests/ByRefInTests.cs b/test/DivertR.UnitTests/ByRefInTests.cs index eb0099c9..dd4d1030 100644 --- a/test/DivertR.UnitTests/ByRefInTests.cs +++ b/test/DivertR.UnitTests/ByRefInTests.cs @@ -1,5 +1,4 @@ -using DivertR.DynamicProxy; -using DivertR.UnitTests.Model; +using DivertR.UnitTests.Model; using Shouldly; using Xunit; @@ -7,10 +6,13 @@ namespace DivertR.UnitTests { public class ByRefInTests { - // Due to a known issue DispatchProxy does not currently support in byref parameters +#if NET6_0_OR_GREATER + private static readonly DiverterSettings DiverterSettings = new(); +#else + // Due to a known issue DispatchProxy does not support in byref parameters prior to .NET 6 // https://github.com/dotnet/runtime/issues/47522 - private static readonly DiverterSettings DiverterSettings = new(new DynamicProxyFactory()); - + private static readonly DiverterSettings DiverterSettings = new(proxyFactory: new DynamicProxy.DynamicProxyFactory()); +#endif private readonly IVia _via = new ViaSet(DiverterSettings).Via(); [Fact]