public void MapFriendlyUrlRouteTest()
        {
            RouteCollection routes = new RouteCollection();
            routes.MapFriendlyUrlRoute("Name", "Url");
            Assert.AreEqual(1, routes.Count);

            FriendlyUrlRoute route = routes["Name"] as FriendlyUrlRoute;
            Assert.AreNotEqual(null, route);
            Assert.AreEqual("Url", route.Url);
        }
        public void MapFriendlyUrlRouteTest3()
        {
            RouteCollection routes = new RouteCollection();
            routes.MapFriendlyUrlRoute("Name", "Url", new { controller = "Home" }, new { constraint = "Constraint" });
            Assert.AreEqual(1, routes.Count);

            FriendlyUrlRoute route = routes["Name"] as FriendlyUrlRoute;
            Assert.AreNotEqual(null, route);
            Assert.AreEqual(1, route.Constraints.Count);
            Assert.IsTrue(route.Constraints.ContainsKey("constraint"));
            Assert.AreEqual("Constraint", route.Constraints["constraint"]);
        }