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 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); }