internal static void RouteDoesNotHaveMethod(HttpConfiguration config, string url, HttpMethod httpMethod) { var absoluteUrl = UrlHelpers.MakeAbsolute(url); var request = new HttpRequestMessage(httpMethod, absoluteUrl); var routeGenerator = new Generator(config, request); routeGenerator.CheckNoMethod(url, httpMethod); }
public static void RouteDoesNotHaveMethod(HttpConfiguration config, string url, Type controllerType, HttpMethod httpMethod) { var absoluteUrl = UrlHelpers.MakeAbsolute(url); var request = new HttpRequestMessage(httpMethod, absoluteUrl); var routeGenerator = new Generator(config, request); routeGenerator.CheckControllerHasNoMethod(url, httpMethod, controllerType); }
internal static void NoRouteMatches(HttpConfiguration config, string url) { var absoluteUrl = UrlHelpers.MakeAbsolute(url); var request = new HttpRequestMessage(HttpMethod.Get, absoluteUrl); var routeGenerator = new Generator(config, request); if (routeGenerator.HasMatchedRoute) { var hasRouteMessage = string.Format("Matched a route for url '{0}'", url); Asserts.Fail(hasRouteMessage); } }
private static IDictionary<string, string> ReadRequestProperties(HttpConfiguration config, string url, HttpMethod httpMethod, string body) { var request = new HttpRequestMessage(httpMethod, url); request.Content = new StringContent(body); var routeGenerator = new Generator(config, request); return routeGenerator.ReadRequestProperties(url, httpMethod); }