public void ShouldGetRouteInformation()
        {
            RouteValueDictionary expected = new RouteValueDictionary(new {
                controller = "Artists",
                action = "List",
                genre = "All"
            });

            RouteInformation ri = new RouteInformation("~/Artists", RegisterRoutes);

            Assert.AreEqual("~/Artists", ri.Url);
            Assert.IsTrue(ri.Valid);
            Assert.AreEqual("Artists", ri.Controller);
            Assert.AreEqual("List", ri.Action);
            Assert.IsTrue(ri.IsActionOnController("Artists"));
            Assert.IsTrue(ri.IsActionOnController("ArtistsController"));
            RoutingAssert.AreDictionariesEqual(expected, ri.RouteValues);
        }
        public void ShouldNotGetRouteInformationForNonExistentRoute()
        {
            RouteInformation ri = new RouteInformation("/Invalid", RegisterRoutes);

            Assert.IsFalse(ri.Valid);
        }
        public void ShouldNotGetRouteInformationForAbsoluteRoute()
        {
            RouteInformation ri = new RouteInformation("http://localhost/Artists", RegisterRoutes);

            Assert.IsFalse(ri.Valid);
        }
        public void ShouldNotGetAuthoriseRequired()
        {
            RouteInformation ri = new RouteInformation("/Test", RegisterRoutes);

            Assert.IsFalse(ri.DoesActionRequireAuthorisation());
        }
        public void ShouldGetAuthorizeRequired()
        {
            RouteInformation ri = new RouteInformation("/Artists", RegisterRoutes);

            Assert.IsTrue(ri.DoesActionRequireAuthorisation());
        }
        public void ShouldProperlyFormatUrl2()
        {
            RouteInformation ri = new RouteInformation("Artists", RegisterRoutes);

            Assert.AreEqual("Artists", ri.Url);
        }
        public void ShouldNotGetRouteInformationForNullUrl()
        {
            RouteInformation ri = new RouteInformation("", RegisterRoutes);

            Assert.IsFalse(ri.Valid);
        }