Beispiel #1
0
        public void Test3()
        {
            RouteAttribute r      = new RouteAttribute("/post/:postId/comment/:commentId", true);
            var            result = r.MatchPath("/Post/10/Comment/2");

            Assert.IsFalse(result.Match);
        }
Beispiel #2
0
        public void Test1()
        {
            RouteAttribute r      = new RouteAttribute("/post/:postId/comment/:commentId");
            var            result = r.MatchPath("/Post/10/comment/2");

            Assert.IsTrue(result.Match);
            Assert.AreEqual("10", result.Captured["postId"]);
            Assert.AreEqual("2", result.Captured["commentId"]);
        }