Ejemplo n.º 1
0
        public void Register_WithValidHttpConfiguration_RegistersDefaultApiRoute()
        {
            HttpRouteCollection routes        = new HttpRouteCollection();
            HttpConfiguration   configuration = new HttpConfiguration(routes);

            WebApiConfig.Register(configuration);

            HttpRoute defaultRoute = routes.SingleOrDefault(route => route.RouteTemplate == "api/{controller}/{id}") as HttpRoute;

            Assert.IsNotNull(defaultRoute);
        }