public void InBoundUrl_WithGetMethod_AndEmptyArg_IsRouted() { Expression<Func<SkinsController, ActionResult>> action = controller => controller.Apply(string.Empty); var url = new SkinsRouter.ApplyRoute().Url.ToAppRelativeUrl() .Replace("/{skinFile}", string.Empty); url.WithMethod(HttpVerbs.Get).ShouldMapTo(action); }
public void InBoundUrl_WithNonGetMethod_AndNonNullArg_IsNotRouted() { var url = new SkinsRouter.ApplyRoute().Url.ToAppRelativeUrl() .Replace("/{skinFile}", string.Empty); url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing(); }
public void OutBoundUrl_OfActionWithWithNonNullArg_IsRouted() { const string skinFile = "skin-file"; Expression<Func<SkinsController, ActionResult>> action = controller => controller.Apply(skinFile); var url = new SkinsRouter.ApplyRoute().Url.ToAppRelativeUrl() .Replace("{skinFile}", skinFile); OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url); }