Пример #1
0
            public void InBoundUrl_WithGetMethod_IsRouted()
            {
                Expression <Func <HealthController, ActionResult> > action =
                    controller => controller.RunEstablishmentHierarchy();
                var url = new HealthRouter.RunEstablishmentHierarchyRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
Пример #2
0
            public void OutBoundUrl_IsRouted()
            {
                Expression <Func <HealthController, ActionResult> > action =
                    controller => controller.RunEstablishmentHierarchy();
                var url = new HealthRouter.RunEstablishmentHierarchyRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(Area).AppRelativeUrl().ShouldEqual(url);
            }
Пример #3
0
            public void InBoundUrl_WithNonGetMethod_IsNotRouted()
            {
                var url = new HealthRouter.RunEstablishmentHierarchyRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
            }