public void InBoundUrl_WithGetMethod_IsRouted() { Expression <Func <ManagementFormsController, ActionResult> > action = controller => controller.NewName(); var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void OutBoundUrl_IsRouted() { Expression <Func <ManagementFormsController, ActionResult> > action = controller => controller.NewName(); var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url); }
public void InBoundUrl_WithNonGetMethod_IsNotRouted() { var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing(); }
public void InBoundUrl_WithGetMethod_IsRouted() { Expression<Func<ManagementFormsController, ActionResult>> action = controller => controller.NewName(); var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void OutBoundUrl_IsRouted() { Expression<Func<ManagementFormsController, ActionResult>> action = controller => controller.NewName(); var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url); }
public void InBoundUrl_WithNonGetMethod_IsNotRouted() { var url = new ManagementFormsRouter.NewNameRoute().Url.ToAppRelativeUrl(); url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing(); }