Inheritance: UCosmic.Www.Mvc.Controllers.MvcRoute
 public void InBoundUrl_WithGetMethod_IsRouted()
 {
     const double latitude = 1.1;
     const double longitude = -1.1;
     Expression<Func<SupplementalFormsController, ActionResult>> action =
        controller => controller.FindPlaces(latitude, longitude);
     var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl();
     url.WithMethod(HttpVerbs.Get).AndMethodArg("latitude", latitude)
         .AndMethodArg("longitude", longitude).ShouldMapTo(action);
 }
 public void OutBoundUrl_IsRouted()
 {
     const double latitude = 1.1;
     const double longitude = -1.1;
     Expression<Func<SupplementalFormsController, ActionResult>> action =
        controller => controller.FindPlaces(latitude, longitude);
     var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl()
         .AddQueryString("?latitude={0}&longitude={1}", latitude, longitude);
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }
Exemplo n.º 3
0
            public void InBoundUrl_WithGetMethod_IsRouted()
            {
                const double latitude  = 1.1;
                const double longitude = -1.1;
                Expression <Func <SupplementalFormsController, ActionResult> > action =
                    controller => controller.FindPlaces(latitude, longitude);
                var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).AndMethodArg("latitude", latitude)
                .AndMethodArg("longitude", longitude).ShouldMapTo(action);
            }
Exemplo n.º 4
0
            public void OutBoundUrl_IsRouted()
            {
                const double latitude  = 1.1;
                const double longitude = -1.1;
                Expression <Func <SupplementalFormsController, ActionResult> > action =
                    controller => controller.FindPlaces(latitude, longitude);
                var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl()
                          .AddQueryString("?latitude={0}&longitude={1}", latitude, longitude);

                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
 public void InBoundUrl_WithNonGetMethod_IsNotRouted()
 {
     var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
Exemplo n.º 6
0
            public void InBoundUrl_WithNonGetMethod_IsNotRouted()
            {
                var url = new SupplementalFormsRouter.FindPlacesRoute().Url.ToAppRelativeUrl();

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