private void InitContext() { HttpContext.Current = CommonHelpers.GetHttpContext(); var wrapper = new HttpContextWrapper(HttpContext.Current); pollController.ControllerContext = new ControllerContext( wrapper, new RouteData(), pollController); pollController.Init(); }