public void Resolves_the_right_handler_for_expexted_paths() { foreach (var item in pathInfoMap) { var expectedType = item.Value; var handler = ServiceStackHttpHandlerFactory.GetHandlerForPathInfo(null, item.Key, null, null); Assert.That(handler.GetType(), Is.EqualTo(expectedType)); } }
private static EndpointHandlerBase GetHandler(string httpMethod, string pathInfo) { var httpHandler = ServiceStackHttpHandlerFactory.GetHandlerForPathInfo(httpMethod, pathInfo, pathInfo, null) as EndpointHandlerBase; if (httpHandler == null) { throw new NotSupportedException(pathInfo); } return(httpHandler); }
public void Resolves_the_right_handler_for_case_insensitive_expexted_paths() { foreach (var item in pathInfoMap) { var expectedType = item.Value; var lowerPathInfo = item.Key.ToLower(); var handler = ServiceStackHttpHandlerFactory.GetHandlerForPathInfo(null, lowerPathInfo); Assert.That(handler.GetType(), Is.EqualTo(expectedType)); } }