public void Outbound_ForGetAction_MapsToUrl() { Expression<Func<UpdateNameController, ActionResult>> action = controller => controller.Get(); var url = new UpdateNameRouter.GetRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get).AppRelativeUrl().ShouldEqual(url); }
public void Inbound_WithGet_MapsToGetAction() { Expression<Func<UpdateNameController, ActionResult>> action = controller => controller.Get(); var url = new UpdateNameRouter.GetRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void Outbound_ForGetAction_MapsToUrl() { Expression <Func <UpdateNameController, ActionResult> > action = controller => controller.Get(); var url = new UpdateNameRouter.GetRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get).AppRelativeUrl().ShouldEqual(url); }
public void Inbound_WithGet_MapsToGetAction() { Expression <Func <UpdateNameController, ActionResult> > action = controller => controller.Get(); var url = new UpdateNameRouter.GetRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void Inbound_WithNonGet_MapsToNothing() { var url = new UpdateNameRouter.GetRoute().Url.ToAppRelativeUrl(); url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing(); }