Skip to content

How to mock HttpRequest.Query? #26725

Answered by Tratcher
lommez asked this question in General
Oct 9, 2020 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lommez
Comment options

@Tratcher
Comment options

Tratcher Oct 9, 2020
Collaborator

@lommez
Comment options

Answer selected by lommez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants