Inheritance: UCosmic.Www.Mvc.Controllers.MvcRoute
Ejemplo n.º 1
0
 public void Maps2Urls_SiteRoot_Features_OptionalVersion()
 {
     var obj1 = new FeaturesRouter.ReleasesRoute();
     var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
            public void Maps2Urls_SiteRoot_Features_OptionalVersion()
            {
                var obj1 = new FeaturesRouter.ReleasesRoute();
                var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();

                obj1.ShouldNotBeNull();
                obj2.ShouldNotBeNull();
            }
Ejemplo n.º 4
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);
            }
Ejemplo n.º 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);
            }
Ejemplo n.º 6
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);
            }
Ejemplo n.º 7
0
 public void InBoundUrl_WithNonGetMethod_AndCurrentVersion_IsNotRouted()
 {
     var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
Ejemplo n.º 8
0
            public void InBoundUrl_WithNonGetMethod_AndCurrentVersion_IsNotRouted()
            {
                var url = new FeaturesRouter.ReleasesRoute().Url.ToAppRelativeUrl();

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