public void Inbound_WithPost_MapsToPutAction()
            {
                Expression<Func<UpdateNameController, ActionResult>> action =
                    controller => controller.Put(null);
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Post).ShouldMapTo(action);
            }
Beispiel #2
0
            public void Inbound_WithPost_MapsToPutAction()
            {
                Expression <Func <UpdateNameController, ActionResult> > action =
                    controller => controller.Put(null);
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Post).ShouldMapTo(action);
            }
            public void Outbound_ForPutAction_WithPutMethod_MapsToUrl()
            {
                Expression<Func<UpdateNameController, ActionResult>> action =
                    controller => controller.Put(null);
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Put)
                    .AppRelativeUrl().ShouldEqual(url);
            }
Beispiel #4
0
            public void Outbound_ForPutAction_WithPostMethod_MapsToUrl()
            {
                Expression <Func <UpdateNameController, ActionResult> > action =
                    controller => controller.Put(null);
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Post)
                .AppRelativeUrl().ShouldEqual(url);
            }
            public void Inbound_WithNonPutOrPost_MapsToNothing()
            {
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Put, HttpVerbs.Post).ShouldMapToNothing();
            }
Beispiel #6
0
            public void Inbound_WithNonPutOrPost_MapsToNothing()
            {
                var url = new UpdateNameRouter.PutRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Put, HttpVerbs.Post).ShouldMapToNothing();
            }