Inheritance: UCosmic.Www.Mvc.Controllers.MvcRoute
Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public void InBoundUrl_WithNonGetMethod_AndNonNullArg_IsNotRouted()
 {
     var url = new SkinsRouter.ApplyRoute().Url.ToAppRelativeUrl()
         .Replace("/{skinFile}", string.Empty);
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
Exemplo n.º 3
0
 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);
 }