示例#1
0
        public HttpRequestMessage BuildPOSTRequest(string bucketKey, HttpRequestMessage request, HttpResponseMessage response)
        {
            var runscopeRequest  = new RunscopeRequest(request);
            var runscopeResponse = new RunscopeResponse(response);
            var runscopeMessage  = new RunscopeMessage
            {
                Request = runscopeRequest, Response = runscopeResponse
            };

            return(BuildPOSTRequest(bucketKey, runscopeMessage));
        }
        public HttpRequestMessage BuildPOSTRequest(string bucketKey, HttpRequestMessage request, HttpResponseMessage response)
        {
            var runscopeRequest = new RunscopeRequest(request);
            var runscopeResponse = new RunscopeResponse(response);
            var runscopeMessage = new RunscopeMessage
            {
                Request = runscopeRequest, Response = runscopeResponse
            };

            return BuildPOSTRequest(bucketKey, runscopeMessage);
        }
        public void CreateMinimumRunscopeResponse()
        {
            var httpResponseMessage = new HttpResponseMessage() { StatusCode= HttpStatusCode.NotFound};
            var message = new RunscopeResponse(httpResponseMessage);
            var jresponse = message.ToJObject();
            var expected =
                new JObject(new[]
                {
                    new JProperty("status", 404),
                    
                });

            Assert.Equal(expected, jresponse);
        }