Skip to content

How can I alter / mock IResolverContext in a unit test? #4711

Answered by michaelstaib
daniel-097 asked this question in Q&A
Discussion options

You must be logged in to vote

So in the case of auth, you can just pass in with your request a claims principal that is configured to your auth requirements.

In order to do that you the QueryRequestBuilder and add a property with the key nameof(ClaimsPrincipal) and as the value the ClaimsPrincipal

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@daniel-097
Comment options

Answer selected by daniel-097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants