public void Maps2Urls_FirstWithReturnUrl_ThenWithout()
 {
     var obj1 = new SupplementalFormsRouter.LocateGetRoute();
     var obj2 = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
Exemple #2
0
            public void Maps2Urls_FirstWithReturnUrl_ThenWithout()
            {
                var obj1 = new SupplementalFormsRouter.LocateGetRoute();
                var obj2 = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute();

                obj1.ShouldNotBeNull();
                obj2.ShouldNotBeNull();
            }
 public void OutBoundUrl_OfActionWithNullReturnUrl_IsRoutedTo_UrlWithoutCatchall()
 {
     var establishmentId = Guid.NewGuid();
     Expression<Func<SupplementalFormsController, ActionResult>> action =
        controller => controller.Locate(establishmentId, null);
     var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl()
         .Replace("{establishmentId}", establishmentId.ToString());
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }
Exemple #4
0
            public void InBoundUrl_WithGetMethod_AndNoCatchall_IsRoutedTo_ActionWithNullArg()
            {
                var establishmentId = Guid.NewGuid();
                Expression <Func <SupplementalFormsController, ActionResult> > action =
                    controller => controller.Locate(establishmentId, null);
                var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl()
                          .Replace("{establishmentId}", establishmentId.ToString());

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
Exemple #5
0
            public void OutBoundUrl_OfActionWithNullReturnUrl_IsRoutedTo_UrlWithoutCatchall()
            {
                var establishmentId = Guid.NewGuid();
                Expression <Func <SupplementalFormsController, ActionResult> > action =
                    controller => controller.Locate(establishmentId, null);
                var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl()
                          .Replace("{establishmentId}", establishmentId.ToString());

                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
 public void InBoundUrl_WithNonGetMethod_AndNoCatchall_IsNotRouted()
 {
     var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
 public void InBoundUrl_WithGetMethod_AndNoCatchall_IsRoutedTo_ActionWithNullArg()
 {
     var establishmentId = Guid.NewGuid();
     Expression<Func<SupplementalFormsController, ActionResult>> action =
        controller => controller.Locate(establishmentId, null);
     var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl()
         .Replace("{establishmentId}", establishmentId.ToString());
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
Exemple #8
0
            public void InBoundUrl_WithNonGetMethod_AndNoCatchall_IsNotRouted()
            {
                var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl();

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