public void Maps2Urls_FirstWithReturnUrl_ThenWithout()
 {
     var obj1 = new SupplementalFormsRouter.LocateGetRoute();
     var obj2 = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute();
     obj1.ShouldNotBeNull();
     obj2.ShouldNotBeNull();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
            }
Ejemplo n.º 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);
 }
Ejemplo n.º 8
0
            public void InBoundUrl_WithNonGetMethod_AndNoCatchall_IsNotRouted()
            {
                var url = new SupplementalFormsRouter.LocateGetWithoutReturnUrlRoute().Url.ToAppRelativeUrl();

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