I have this in my controller
public ActionResult Testing()
{
CustomerContactModel model = new CustomerContactModel();
...
HttpContext.Current.Session["xxxx"] = "Data";
return PartialView("MyPartialView", model);
}
I get an exception on HttpContext when I get run the controller action from my trest method. How can I solve this problem ?
Thanks,
Try this:
http://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx