상속: UCosmic.Www.Mvc.Controllers.MvcRoute
            public void Inbound_WithGet_MapsToAction()
            {
                Expression <Func <PersonNameController, ActionResult> > action =
                    controller => controller.AutoCompleteSuffixes(null);
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
            public void Outbound_ForGetAction_MapsToUrl()
            {
                Expression <Func <PersonNameController, ActionResult> > action =
                    controller => controller.AutoCompleteSuffixes(null);
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get)
                .AppRelativeUrl().ShouldEqual(url);
            }
예제 #3
0
            public void Inbound_WithNonGet_MapsToNothing()
            {
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

                url.WithMethodsExcept(HttpVerbs.Get).ShouldMapToNothing();
            }
예제 #4
0
            public void Inbound_WithGet_MapsToAction()
            {
                Expression<Func<PersonNameController, ActionResult>> action =
                    controller => controller.AutoCompleteSuffixes(null);
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

                url.WithMethod(HttpVerbs.Get).ShouldMapTo(action);
            }
예제 #5
0
            public void Outbound_ForGetAction_MapsToUrl()
            {
                Expression<Func<PersonNameController, ActionResult>> action =
                    controller => controller.AutoCompleteSuffixes(null);
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

                OutBoundRoute.Of(action).InArea(AreaName).WithMethod(HttpVerbs.Get)
                    .AppRelativeUrl().ShouldEqual(url);
            }
            public void Inbound_WithNonGet_MapsToNothing()
            {
                var url = new PersonNameRouter.AutoCompleteSuffixesRoute().Url.ToAppRelativeUrl();

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