You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a mocked interface has a method with an interpolated string handler an exception is thrown if the method is called.
To Reproduce
using System.Runtime.CompilerServices;varfoo= NSubstitute.Substitute.For<IFoo>();
foo.Foo($"{foo.GetType()}");publicinterfaceIFoo{voidFoo(DefaultInterpolatedStringHandlerhandler);}
System.InvalidProgramException
HResult=0x8013153A
Message=Common Language Runtime detected an invalid program.
Source=DynamicProxyGenAssembly2
StackTrace:
at Castle.Proxies.ObjectProxy.Foo(DefaultInterpolatedStringHandler handler)
at Program.<Main>$(String[] args) in Program.cs:line 6
Expected behaviour
No exception
Environment:
NSubstitute version: 5.0
Platform: .NET 7.0
The text was updated successfully, but these errors were encountered:
Describe the bug
If a mocked interface has a method with an interpolated string handler an exception is thrown if the method is called.
To Reproduce
Expected behaviour
No exception
Environment:
The text was updated successfully, but these errors were encountered: