Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My application has a BaseController in which the HttpContext.Current.Session[CacheKey] is used.
how do i mock the above session while unit testing.
I have the fake HttpContext Helpers...how do i use them....
also my HttpContext.Current.Session[CacheKey] manages the language of the browser where CacheKey is:
C#
public static readonly string CacheKey = "en-us";
Posted
Updated 22-Feb-13 1:22am
v2
Comments
ArunAmalraj 22-Feb-13 6:28am    
Check it out:-

"http://stackoverflow.com/questions/4379450/mock-httpcontext-current-in-test-init-method"

It might help you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900