Created
February 19, 2013 13:54
-
-
Save juristr/4986092 to your computer and use it in GitHub Desktop.
Mock HttpContext class
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
IIdentity identity = new GenericIdentity(AccoDAOTest.userADNamePresentInDB); | |
IPrincipal currentUser = new GenericPrincipal(identity, null); | |
TextWriter tw = new StringWriter(); | |
HttpWorkerRequest wr = new SimpleWorkerRequest("/webapp", "c:\\inetpub\\wwwroot\\webapp\\", "default.aspx", "", tw); | |
HttpContext.Current = new HttpContext(wr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment