Example #1
0
        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
        }
Example #2
0
        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);
        }
Example #3
0
		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 
		}
Example #4
0
		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);
		}