Пример #1
0
        public RestWebServer(int port, string urlPrefix) : base(port)
        {
            var fixedFormatUrlPrefix = urlPrefix.FormatRelativeUri();

            _requestHandler      = new RestControllerRequestHandler(fixedFormatUrlPrefix);
            _restToHttpConverter = new RestResponseToHttpResponseConverter();
        }
Пример #2
0
        public void Visit_Delete_DefaultResponse()
        {
            RestResponseToHttpResponseConverter v = new RestResponseToHttpResponseConverter();
            var httpResponse = v.Visit(new DeleteResponse(DeleteResponse.ResponseStatus.OK), null);

            StringAssert.Contains(httpResponse.Response, "200 OK");
            StringAssert.Contains(httpResponse.Response, "Connection: ");
            StringAssert.Contains(httpResponse.Response, "Date: ");
        }