public void ToString_With_A_Response_Indicates_Zero_Content_Length()
 {
     HttpResponseMessage response = new HttpResponseMessage();
     response.Content = new ByteArrayContent(new byte[0]);
     HttpMessage message = new HttpMessage(response);
     Assert.AreEqual("HTTP response message body with a content length of '0' bytes.", message.ToString(), "HttpMessage.ToString() should have returned 'HTTP response message body with a content length of '0' bytes.'.");
 }
 public void ToString_With_A_Request_Indicates_Zero_Content_Length()
 {
     HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://localhost");
     request.Content = new ByteArrayContent(new byte[0]);
     HttpMessage message = new HttpMessage(request);
     Assert.AreEqual("HTTP request message body with a content length of '0' bytes.", message.ToString(), "HttpMessage.ToString() should have returned 'HTTP request message body with a content length of '0' bytes.'.");
 }
 public void ToString_With_A_Response_And_UnSeekable_HttpContent_Indicates_Unknown_Content_Length()
 {
     HttpResponseMessage response = new HttpResponseMessage();
     response.Content = new StreamContent(new MockUnseekableStream(new MemoryStream()));
     HttpMessage message = new HttpMessage(response);
     Assert.AreEqual("HTTP response message body with an undetermined content length.", message.ToString(), "HttpMessage.ToString() should have returned 'HTTP response message body with an undetermined content length.'.");
 }
 public void ToString_With_A_Request_And_UnSeekable_HttpContent_Indicates_Unknown_Content_Length()
 {
     HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://localhost");
     request.Content = new StreamContent(new MockUnseekableStream(new MemoryStream()));
     HttpMessage message = new HttpMessage(request);
     Assert.AreEqual("HTTP request message body with an undetermined content length.", message.ToString(), "HttpMessage.ToString() should have returned 'HTTP request message body with an undetermined content length.'.");
 }