예제 #1
0
        public void TestDeleteToTarget()
        {
            var m = new MockManosModule ();
            var req = new MockHttpRequest ("DELETE", "/Foobar");

            m.Delete ("/Foobar", new ManosAction (FakeAction));
            Assert.AreEqual (new ManosAction (FakeAction), m.Routes.Find (req).Action);

            req = new MockHttpRequest ("GET", "/Foobar");
            Assert.IsNull (m.Routes.Find (req));
        }
예제 #2
0
        public void TestDeleteToTarget()
        {
            var m   = new MockManosModule();
            var req = new MockHttpRequest(HttpMethod.HTTP_DELETE, "/Foobar");

            m.Delete("/Foobar", new ManosAction(FakeAction));
            Assert.AreEqual(new ManosAction(FakeAction), m.Routes.Find(req).Action);

            req = new MockHttpRequest(HttpMethod.HTTP_GET, "/Foobar");
            Assert.IsNull(m.Routes.Find(req));
        }
예제 #3
0
        public void TestDeleteToModule()
        {
            var m = new MockManosModule ();
            var req = new MockHttpRequest ("DELETE", "/FakeModule/FakeAction");

            m.Delete ("/FakeModule", new FakeModule ());

            //
            // I guess technically this is testing the auto name registering too
            //
            Assert.AreEqual (new ManosAction (FakeModule.FakeAction), m.Routes.Find (req).Action);

            req = new MockHttpRequest ("GET", "/FakeModule/FakeAction");
            Assert.IsNull (m.Routes.Find (req));
        }
예제 #4
0
        public void TestDeleteToModule()
        {
            var m   = new MockManosModule();
            var req = new MockHttpRequest(HttpMethod.HTTP_DELETE, "/FakeModule/FakeAction");

            m.Delete("/FakeModule", new FakeModule());

            //
            // I guess technically this is testing the auto name registering too
            //
            Assert.AreEqual(new ManosAction(FakeModule.FakeAction), m.Routes.Find(req).Action);

            req = new MockHttpRequest(HttpMethod.HTTP_GET, "/FakeModule/FakeAction");
            Assert.IsNull(m.Routes.Find(req));
        }