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