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
When substituting a method that takes in an argument of type IEnumerable<T> where T is an enum, passing in casted arrays returns incorrect results. This is the case for both Arg.Any and directly passing the array in the setup. In the example below we expect the Subsitute to return "Hello" in both cases, but an empty string is returned instead. In Versions <=5.1 these Argument Matchers behave correctly.
Expected behaviour
In the case of Arg.Any<IEnumerable> "Hello" should always be returned. Even passing null will return "Hello".
In the case of passing the object that the Subsitute was set up for, "Hello" should be returned.
Environment:
NSubstitute version: 5.3. In Versions <=5.1 these Argument Matchers behave correctly.
Platform: dotnet8 on Windows
The text was updated successfully, but these errors were encountered:
Describe the bug
When substituting a method that takes in an argument of type
IEnumerable<T>
where T is an enum, passing in casted arrays returns incorrect results. This is the case for both Arg.Any and directly passing the array in the setup. In the example below we expect the Subsitute to return "Hello" in both cases, but an empty string is returned instead. In Versions <=5.1 these Argument Matchers behave correctly.To Reproduce
Expected behaviour
In the case of Arg.Any<IEnumerable> "Hello" should always be returned. Even passing null will return "Hello".
In the case of passing the object that the Subsitute was set up for, "Hello" should be returned.
Environment:
The text was updated successfully, but these errors were encountered: