public void Inbound_WithPost_MapsToPostAction() { Expression <Func <PersonInfoController, ActionResult> > action = controller => controller.WithEmail(); var url = new PersonInfoRouter.WithEmailRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Post).ShouldMapTo(action); }
public void Outbound_ForPostAction_MapsToUrl() { Expression <Func <PersonInfoController, ActionResult> > action = controller => controller.WithEmail(); var url = new PersonInfoRouter.WithEmailRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Post) .AppRelativeUrl().ShouldEqual(url); }
public void Inbound_WithNonPost_MapsToNothing() { var url = new PersonInfoRouter.WithEmailRoute().Url.ToAppRelativeUrl(); url.WithMethodsExcept(HttpVerbs.Post).ShouldMapToNothing(); }
public void Inbound_WithPost_MapsToPostAction() { Expression<Func<PersonInfoController, ActionResult>> action = controller => controller.WithEmail(); var url = new PersonInfoRouter.WithEmailRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Post).ShouldMapTo(action); }
public void Outbound_ForPostAction_MapsToUrl() { Expression<Func<PersonInfoController, ActionResult>> action = controller => controller.WithEmail(); var url = new PersonInfoRouter.WithEmailRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Post) .AppRelativeUrl().ShouldEqual(url); }