コード例 #1
0
 public void Maps2Urls_SiteRoot_Features_OptionalVersion()
 {
     var obj1 = new FeaturesRouter.ReleasesRoute();
     var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
コード例 #2
0
 public void OutBoundUrl_OfAction_WithNullArg_IsRoutedTo_Features()
 {
     Expression<Func<FeaturesController, ActionResult>> action =
         controller => controller.Releases(null);
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url
         .Replace("/{version}", string.Empty).ToAppRelativeUrl();
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }
コード例 #3
0
            public void Maps2Urls_SiteRoot_Features_OptionalVersion()
            {
                var obj1 = new FeaturesRouter.ReleasesRoute();
                var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();

                obj1.ShouldNotBeNull();
                obj2.ShouldNotBeNull();
            }
コード例 #4
0
            public void InBoundUrl_WithNonGetMethod_AndNonCurrentVersion_IsNotRouted()
            {
                const string otherVersion = "version";
                var          url          = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();

                url = url.Replace("{version}", otherVersion);
                url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
            }
コード例 #5
0
 public void OutBoundUrl_OfAction_WithNonCurrentVersionArg_IsRoutedTo_Features()
 {
     const string otherVersion = "version";
     Expression<Func<FeaturesController, ActionResult>> action =
         controller => controller.Releases(otherVersion);
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();
     url = url.Replace("{version}", otherVersion);
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }
コード例 #6
0
            public void OutBoundUrl_OfAction_WithNullArg_IsRoutedTo_Features()
            {
                Expression <Func <FeaturesController, ActionResult> > action =
                    controller => controller.Releases(null);
                var url = new FeaturesRouter.ReleasesRouteWithVersion().Url
                          .Replace("/{version}", string.Empty).ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
コード例 #7
0
            public void InBoundUrl_WithGetMethod_AndNonCurrentVersion_IsRoutedTo_Features()
            {
                const string otherVersion = "version";
                Expression <Func <FeaturesController, ActionResult> > action =
                    controller => controller.Releases(otherVersion);
                var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();

                url = url.Replace("{version}", otherVersion);
                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
コード例 #8
0
            public void OutBoundUrl_OfAction_WithNonCurrentVersionArg_IsRoutedTo_Features()
            {
                const string otherVersion = "version";
                Expression <Func <FeaturesController, ActionResult> > action =
                    controller => controller.Releases(otherVersion);
                var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();

                url = url.Replace("{version}", otherVersion);
                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
コード例 #9
0
 public void InBoundUrl_WithNonGetMethod_AndNonCurrentVersion_IsNotRouted()
 {
     const string otherVersion = "version";
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();
     url = url.Replace("{version}", otherVersion);
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
コード例 #10
0
 public void InBoundUrl_WithGetMethod_AndNonCurrentVersion_IsRoutedTo_Features()
 {
     const string otherVersion = "version";
     Expression<Func<FeaturesController, ActionResult>> action =
         controller => controller.Releases(otherVersion);
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();
     url = url.Replace("{version}", otherVersion);
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
コード例 #11
0
 public void InBoundUrl_WithNonGetMethod_AndNullVersion_IsNotRouted()
 {
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
コード例 #12
0
            public void InBoundUrl_WithNonGetMethod_AndNullVersion_IsNotRouted()
            {
                var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();

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