public void PostResolveRequestCache() { var m = new UrlRoutingModule(); RouteTable.Routes.Add(new MyRoute("{foo}/{bar}", new MyRouteHandler())); var hc = new HttpContextStub4("~/x/y", "z", "apppath", false); hc.SetResponse(new HttpResponseStub(2)); m.PostResolveRequestCache(hc); Assert.AreEqual(null, hc.RewrittenPath, "#1"); // it internally stores the handler }
public void Pipeline2() { var m = new UrlRoutingModule(); RouteTable.Routes.Add(new MyRoute("{foo}/{bar}", new MyRouteHandler())); var hc = new HttpContextStub4("~/x/y", "z", "apppath", true); hc.HttpHandler = new MyHttpHandler(); hc.SetResponse(new HttpResponseStub(2)); m.PostResolveRequestCache(hc); Assert.AreEqual(null, hc.RewrittenPath, "#1"); // It tries to set Handler and causes NIE m.PostMapRequestHandler(hc); }
public void PostResolveRequestCache () { var m = new UrlRoutingModule (); RouteTable.Routes.Add (new MyRoute ("{foo}/{bar}", new MyRouteHandler ())); var hc = new HttpContextStub4 ("~/x/y", "z", "apppath", false); hc.SetResponse (new HttpResponseStub (2)); m.PostResolveRequestCache (hc); Assert.AreEqual (null, hc.RewrittenPath, "#1"); // it internally stores the handler }
public void Pipeline2 () { var m = new UrlRoutingModule (); RouteTable.Routes.Add (new MyRoute ("{foo}/{bar}", new MyRouteHandler ())); var hc = new HttpContextStub4 ("~/x/y", "z", "apppath", true); hc.HttpHandler = new MyHttpHandler (); hc.SetResponse (new HttpResponseStub (2)); m.PostResolveRequestCache (hc); Assert.AreEqual (null, hc.RewrittenPath, "#1"); // It tries to set Handler and causes NIE m.PostMapRequestHandler (hc); }