상속: UCosmic.Www.Mvc.Controllers.MvcRoute
예제 #1
0
            public void InBoundUrl_WithGetMethod_IsRouted()
            {
                Expression <Func <ErrorsController, ActionResult> > action =
                    controller => controller.LogAjaxError(null);
                var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
예제 #2
0
            public void OutBoundUrl_IsRouted()
            {
                Expression <Func <ErrorsController, ActionResult> > action =
                    controller => controller.LogAjaxError(null);
                var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
예제 #3
0
            public void InBoundUrl_WithNonGetMethod_IsNotRouted()
            {
                var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
            }
예제 #4
0
 public void InBoundUrl_WithNonGetMethod_IsNotRouted()
 {
     var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();
     url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
 }
예제 #5
0
 public void InBoundUrl_WithGetMethod_IsRouted()
 {
     Expression<Func<ErrorsController, ActionResult>> action =
         controller => controller.LogAjaxError(null);
     var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();
     url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
 }
예제 #6
0
 public void OutBoundUrl_IsRouted()
 {
     Expression<Func<ErrorsController, ActionResult>> action =
         controller => controller.LogAjaxError(null);
     var url = new ErrorsRouter.LogAjaxErrorRoute().Url.ToAppRelativeUrl();
     OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
 }