public void Maps2Urls_SiteRoot_Features_OptionalVersion()
 {
     var obj1 = new FeaturesRouter.ReleasesRoute();
     var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
 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);
 }
            public void Maps2Urls_SiteRoot_Features_OptionalVersion()
            {
                var obj1 = new FeaturesRouter.ReleasesRoute();
                var obj2 = new FeaturesRouter.ReleasesRouteWithVersion();

                obj1.ShouldNotBeNull();
                obj2.ShouldNotBeNull();
            }
            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();
            }
 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);
 }
            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);
            }
            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);
            }
            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);
            }
 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();
 }
 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);
 }
 public void InBoundUrl_WithNonGetMethod_AndNullVersion_IsNotRouted()
 {
     var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
            public void InBoundUrl_WithNonGetMethod_AndNullVersion_IsNotRouted()
            {
                var url = new FeaturesRouter.ReleasesRouteWithVersion().Url.ToAppRelativeUrl();

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