public void Constructor_WithNoRequestAndNoResponse_ReturnsExpectedMessage() { var exception = new RNFException(null, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The request got no response.")); }
public void Constructor_WithNoResponseAndNoUriReturnsExpectedMessage() { var request = new HttpRequestMessage(); var exception = new RNFException(request, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request got no response.")); }
public void Constructor_WithNoResponse_ReturnsExpectedMessage() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.com/"); var exception = new RNFException(request, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request to <http://example.com/> got no response.")); }
public void Constructor_WithNoRequestAndEmptyUri_ReturnsExpectedMessage() { var response = new HttpResponseMessage(HttpStatusCode.NotFound); var exception = new RNFException(null, response); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The request failed with '404 NotFound'.")); }
public void Constructor_WithNoRequestAndNoResponse_ReturnsExpectedMessage() { var exception = new RNFException(null, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The request got no response.")); }
public void Constructor_WithNoResponseAndNoUriReturnsExpectedMessage() { var request = new HttpRequestMessage(); var exception = new RNFException(request, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request got no response.")); }
public void Constructor_WithNoResponse_ReturnsExpectedMessage() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.com/"); var exception = new RNFException(request, null); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request to <http://example.com/> got no response.")); }
public void Constructor_WithNoRequestAndEmptyUri_ReturnsExpectedMessage() { var response = new HttpResponseMessage(HttpStatusCode.NotFound); var exception = new RNFException(null, response); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The request failed with '404 NotFound'.")); }
public void Constructor_WithRequestAndResponse_ReturnsExpectedMessage() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.com/"); var response = new HttpResponseMessage(HttpStatusCode.NotFound); var exception = new RNFException(request, response); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request to <http://example.com/> failed with '404 NotFound'.")); }
public void Constructor_WithRequestAndResponse_ReturnsExpectedMessage() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.com/"); var response = new HttpResponseMessage(HttpStatusCode.NotFound); var exception = new RNFException(request, response); Console.WriteLine(exception); Assert.That(exception.Message, Is.EqualTo("The GET request to <http://example.com/> failed with '404 NotFound'.")); }