コード例 #1
0
            public static HttpProperties CreateHttpProperties()
            {
                var result = new HttpProperties(CreateHttpRequest());

                result.SetResponse(CreateHttpResponse());

                return(result);
            }
コード例 #2
0
        public void SetResponseWithNullArgumentsThrowsException()
        {
            HttpProperties item = new HttpProperties(new HttpRequest(new HttpRequest.CreateOptions
            {
                HttpMethod = "GET",
                Url        = UrlParser.GenerateUri(null)
            }));

            item.SetResponse(null);
        }
コード例 #3
0
        public void SetResponseUpdatesProperty()
        {
            HttpResponse httpResponse = new HttpResponse(new HttpResponse.CreateOptions());

            HttpProperties item = new HttpProperties(new HttpRequest(new HttpRequest.CreateOptions
            {
                HttpMethod = "GET",
                Url        = UrlParser.GenerateUri(null)
            }));

            item.SetResponse(httpResponse);

            Assert.AreSame(httpResponse, item.Response);
        }
コード例 #4
0
        private HttpProperties GetHttpProperties(bool includeResponse)
        {
            HttpProperties httpProperties = new HttpProperties(new HttpRequest(new HttpRequest.CreateOptions
            {
                HttpMethod = "GET",
                Url        = UrlParser.GenerateUri(null)
            }));

            if (includeResponse)
            {
                httpProperties.SetResponse(new HttpResponse(new HttpResponse.CreateOptions()
                {
                }));
            }

            return(httpProperties);
        }