public void Inbound_WithGet_MapsToAction() { Expression<Func<PersonNameController, ActionResult>> action = controller => controller.AutoCompleteSalutations(null); var url = new PersonNameRouter.AutoCompleteSalutationsRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void Inbound_WithGet_MapsToAction() { Expression <Func <PersonNameController, ActionResult> > action = controller => controller.AutoCompleteSalutations(null); var url = new PersonNameRouter.AutoCompleteSalutationsRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void Outbound_ForGetAction_MapsToUrl() { Expression<Func<PersonNameController, ActionResult>> action = controller => controller.AutoCompleteSalutations(null); var url = new PersonNameRouter.AutoCompleteSalutationsRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get) .AppRelativeUrl().ShouldEqual(url); }
public void Outbound_ForGetAction_MapsToUrl() { Expression <Func <PersonNameController, ActionResult> > action = controller => controller.AutoCompleteSalutations(null); var url = new PersonNameRouter.AutoCompleteSalutationsRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get) .AppRelativeUrl().ShouldEqual(url); }
public void Inbound_WithNonGet_MapsToNothing() { var url = new PersonNameRouter.AutoCompleteSalutationsRoute().Url.ToAppRelativeUrl(); url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing(); }