public void PlatformClientFormatBadRequestOk() { HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("content explanation"), }; PlatformClientException exception = new PlatformClientException(response); Assert.Equal("400 - Bad Request - content explanation", exception.Message); }
public void PlatformClientFormat500Ok() { HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent("my error text"), }; PlatformClientException exception = new PlatformClientException(response); Assert.Equal("500 - Internal Server Error - my error text", exception.Message); }
public void PlatformClientExceptionWithMessageOk() { PlatformClientException exception = new PlatformClientException("Something is wrong"); Assert.Equal("Something is wrong", exception.Message); }