-
Is possible to mock HttpRequest.Query property ? When i try to executed my test i got the following error: Could not load type 'Microsoft.AspNetCore.Http.Internal.QueryCollection' from assembly 'Microsoft.AspNetCore.Http, Version=3.1.6.0, |
Beta Was this translation helpful? Give feedback.
Answered by
Tratcher
Oct 9, 2020
Replies: 1 comment 3 replies
-
I don't know why you get that error, but you shouldn't need mocks for HttpRequest. All of the fields were designed to be set to make them easy to test. For Query it might be easier to set HttpRequest.QueryString and let it populate Query for you. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
lommez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know why you get that error, but you shouldn't need mocks for HttpRequest. All of the fields were designed to be set to make them easy to test. For Query it might be easier to set HttpRequest.QueryString and let it populate Query for you.