public static HttpProperties CreateHttpProperties() { var result = new HttpProperties(CreateHttpRequest()); result.SetResponse(CreateHttpResponse()); return(result); }
public void SetResponseWithNullArgumentsThrowsException() { HttpProperties item = new HttpProperties(new HttpRequest(new HttpRequest.CreateOptions { HttpMethod = "GET", Url = UrlParser.GenerateUri(null) })); item.SetResponse(null); }
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); }
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); }