public static void HasApiRoute(HttpConfiguration config, string url, HttpMethod httpMethod, Dictionary <string, string> headers, string body, BodyFormat bodyFormat, object expectations) { var propertyReader = new PropertyReader(); var expectedProps = propertyReader.RouteValues(expectations); ApiRouteAssert.HasRoute(config, url, httpMethod, headers, body, bodyFormat, expectedProps); }
public void To <TController>(HttpMethod httpMethod, Expression <Action <TController> > action) where TController : ApiController { var expressionReader = new ExpressionReader(); IDictionary <string, string> expectedProps = expressionReader.Read(action); ApiRouteAssert.HasRoute(Configuration, Url, httpMethod, requestBody, expectedProps); }
public UrlAndHttpRoutes To <TController>(Dictionary <string, string> headers, Expression <Action <TController> > action) where TController : ApiController { var expressionReader = new ExpressionReader(); var expectedProps = expressionReader.Read(action); ApiRouteAssert.HasRoute(Configuration, Url, HttpMethod, headers, requestBody, bodyFormat, expectedProps); return(this); }
public void ToNoMethod <TController>(HttpMethod httpMethod) where TController : ApiController { var controllerType = typeof(TController); ApiRouteAssert.RouteDoesNotHaveMethod(Configuration, Url, controllerType, httpMethod); }
public void ToNoRoute() { ApiRouteAssert.NoRoute(Configuration, Url); }
public void WithoutHandler() { ApiRouteAssert.HasNoHandler(Configuration, Url); }
public void WithoutHandler <THandler>() where THandler : DelegatingHandler { ApiRouteAssert.HasNoHandlerofType <THandler>(Configuration, Url); }
/// <summary> /// Asserts that an entry in the routing table is not found that matches this url /// </summary> public static void NoApiRouteMatches(HttpConfiguration config, string url) { ApiRouteAssert.NoRouteMatches(config, url); }
/// <summary> /// Asserts that the API route for the url exists to the specified controller, but does not have the specified Http method. /// </summary> public static void ApiRouteDoesNotHaveMethod(HttpConfiguration config, string url, Type controllerType, HttpMethod httpMethod) { ApiRouteAssert.RouteDoesNotHaveMethod(config, url, controllerType, httpMethod); }
public static void HasApiRoute(HttpConfiguration config, string url, HttpMethod httpMethod, string body, IDictionary <string, string> expectedProps) { ApiRouteAssert.HasRoute(config, url, httpMethod, body, expectedProps); }
/// <summary> /// Asserts that the API route exists, has the specified Http method /// </summary> public static void HasApiRoute(HttpConfiguration config, string url, HttpMethod httpMethod) { ApiRouteAssert.HasRoute(config, url, httpMethod); }
public static void HasApiRoute(HttpConfiguration config, string url, HttpMethod httpMethod, Dictionary <string, string> headers, string body, BodyFormat bodyFormat, IDictionary <string, string> expectedProps) { var expectedRouteValues = new RouteValues(expectedProps); ApiRouteAssert.HasRoute(config, url, httpMethod, headers, body, bodyFormat, expectedRouteValues); }
/// <summary> /// Asserts that the API route exists, has the specified Http method /// </summary> public static void HasApiRoute(HttpConfiguration config, string url, HttpMethod httpMethod, Dictionary <string, string> headers) { ApiRouteAssert.HasRoute(config, url, httpMethod, headers); }