Inheritance: UCosmic.Www.Mvc.Controllers.MvcRoute
Example #1
0
 public void Maps2Urls_SiteRoot_Features_OptionalVersion()
 {
     var obj1 = new FeaturesRouter.ReleasesRoute();
     var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
Example #2
0
 public void InBoundUrl_WithGetMethod_AndCurrentVersion_IsRoutedTo_SiteRoot()
 {
     const string currentVersion = FeaturesRouter.ReleasesRoute.CurrentVersion;
     Expression<Func<FeaturesController, ActionResult>> action =
         controller => controller.Releases(currentVersion);
     var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
            public void Maps2Urls_SiteRoot_Features_OptionalVersion()
            {
                var obj1 = new FeaturesRouter.ReleasesRoute();
                var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();

                obj1.ShouldNotBeNull();
                obj2.ShouldNotBeNull();
            }
            public void InBoundUrl_WithGetMethod_AndCurrentVersion_IsRoutedTo_SiteRoot()
            {
                const string currentVersion = FeaturesRouter.ReleasesRoute.CurrentVersion;
                Expression <Func <FeaturesController, ActionResult> > action =
                    controller => controller.Releases(currentVersion);
                var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
Example #5
0
            public void OutBoundUrl_OfAction_WithCurrentVersionArg_IsRoutedTo_SiteRoot()
            {
                const string currentVersion = FeaturesRouter.ReleasesRoute.CurrentVersion;
                Expression<Func<FeaturesController, ActionResult>> action =
                    controller => controller.Releases(currentVersion);
                var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();

                url.ShouldEqual("~/");
                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
            public void OutBoundUrl_OfAction_WithCurrentVersionArg_IsRoutedTo_SiteRoot()
            {
                const string currentVersion = FeaturesRouter.ReleasesRoute.CurrentVersion;
                Expression <Func <FeaturesController, ActionResult> > action =
                    controller => controller.Releases(currentVersion);
                var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();

                url.ShouldEqual("~/");
                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
Example #7
0
 public void InBoundUrl_WithNonGetMethod_AndCurrentVersion_IsNotRouted()
 {
     var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
            public void InBoundUrl_WithNonGetMethod_AndCurrentVersion_IsNotRouted()
            {
                var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
            }