예제 #1
0
 public void Resolves_the_right_handler_for_expexted_paths()
 {
     foreach (var item in pathInfoMap)
     {
         var expectedType = item.Value;
         var handler      = NServiceKitHttpHandlerFactory.GetHandlerForPathInfo(null, item.Key, null, null);
         Assert.That(handler.GetType(), Is.EqualTo(expectedType));
     }
 }
예제 #2
0
        private static EndpointHandlerBase GetHandler(string httpMethod, string pathInfo)
        {
            var httpHandler = NServiceKitHttpHandlerFactory.GetHandlerForPathInfo(httpMethod, pathInfo, pathInfo, null) as EndpointHandlerBase;

            if (httpHandler == null)
            {
                throw new NotSupportedException(pathInfo);
            }
            return(httpHandler);
        }