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
I will preface this by saying I think I may be doing something wrong.
If I have multple task objects returned from mocked async methods stored in the result of a linq query and I use the ".." spread operator, each item in the result gets set to null.
If I have multple task objects returned from "real" async methods stored in the result of a linq query and I use the ".." spread operator, each item is a valid task and is not null.
I assume it has something to do with the linq query and a delay in resolving the enumerable? But then why would it only behave this way when the method is mocked?
Steps to Reproduce
Here's an example unit test. Only the last assert "mockedMethodTasksSpread" fails.
Describe the Bug
I will preface this by saying I think I may be doing something wrong.
If I have multple task objects returned from mocked async methods stored in the result of a linq query and I use the ".." spread operator, each item in the result gets set to null.
If I have multple task objects returned from "real" async methods stored in the result of a linq query and I use the ".." spread operator, each item is a valid task and is not null.
I assume it has something to do with the linq query and a delay in resolving the enumerable? But then why would it only behave this way when the method is mocked?
Steps to Reproduce
Here's an example unit test. Only the last assert "mockedMethodTasksSpread" fails.
Expected Behavior
The assert mockedMethodTasksSpread should pass.
Exception with Stack Trace
Version Info
Here's most of my csproj with nuget versions:
Additional Info
None
The text was updated successfully, but these errors were encountered: