public void ExecuteRequestPipeline() { HttpOperationHandler[] handlers = new HttpOperationHandler[0]; SHttpOperationDescription operation = new SHttpOperationDescription() { ReturnValue = HttpParameter.ResponseMessage }; OperationHandlerPipeline pipeline = new OperationHandlerPipeline(handlers, handlers, operation); HttpRequestMessage request = new HttpRequestMessage(); OperationHandlerPipelineContext context = pipeline.ExecuteRequestPipeline(request, new object[0]); Assert.IsNotNull(context, "Execute returned null context."); }
public void ExecuteResponsePipeline() { HttpOperationHandler[] handlers = new HttpOperationHandler[0]; SHttpOperationDescription operation = new SHttpOperationDescription() { ReturnValue = HttpParameter.ResponseMessage }; OperationHandlerPipeline pipeline = new OperationHandlerPipeline(handlers, handlers, operation); HttpRequestMessage request = new HttpRequestMessage(); HttpResponseMessage response = new HttpResponseMessage() { RequestMessage = request }; OperationHandlerPipelineContext context = pipeline.ExecuteRequestPipeline(request, new object[0]); //// TODO: what is the convention for returning an HttpResponse from the operation? HttpResponseMessage actualResponse = pipeline.ExecuteResponsePipeline(context, new object[0], response); Assert.IsNotNull(actualResponse, "Execute returned null response."); }