var fakeContext = new FakeControllerContext(controller, new NameValueCollection(), new NameValueCollection());
controller.ControllerContext = fakeContext;
controller.Request.QueryString["s"] = ""
或:
var controllerContext = new FakeControllerContext(controller,
new RouteData(), "", "", new string[] { }, new NameValueCollection(),
new NameValueCollection(), new HttpCookieCollection(), new System.Web.SessionState.SessionStateItemCollection());
controller.ControllerContext = controllerContext;