Наследование: UCosmic.Www.Mvc.Controllers.MvcRoute
Пример #1
0
 public void InBoundUrl_WithNonGetMethodIsNotRouted()
 {
     const string skinContext = "skin-context";
     var url = new SkinsRouter.ChangeRoute().Url.ToAppRelativeUrl()
         .Replace("{skinContext}", skinContext);
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
Пример #2
0
 public void InBoundUrl_WithGetMethod_IsRouted()
 {
     const string skinContext = "skin-context";
     Expression<Func<SkinsController, ActionResult>> action =
        controller => controller.Change(skinContext, null);
     var url = new SkinsRouter.ChangeRoute().Url.ToAppRelativeUrl()
         .Replace("{skinContext}", skinContext);
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
Пример #3
0
 public void OutBoundUrl_IsRouted()
 {
     const string skinContext = "skin-context";
     Expression<Func<SkinsController, ActionResult>> action =
        controller => controller.Change(skinContext, null);
     var url = new SkinsRouter.ChangeRoute().Url.ToAppRelativeUrl()
         .Replace("{skinContext}", skinContext);
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }