Created
May 17, 2019 02:40
-
-
Save DoubleCouponDay/9b1ceea4897791e12342c2a957a60d49 to your computer and use it in GitHub Desktop.
mock HttpActionContext
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| actionmock = new HttpActionContext(); | |
| var headerValue = new AuthenticationHeaderValue("Basic", "bzUwkDal="); | |
| var request = new HttpRequestMessage(); | |
| request.Headers.Authorization = headerValue; | |
| var controllerContext = new HttpControllerContext(); | |
| controllerContext.Request = request; | |
| var context = new HttpActionContext(); | |
| context.ControllerContext = controllerContext; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment