Skip to content

Commit 08c1578

Browse files
committed
Add error message to see the difference
1 parent a0d83d7 commit 08c1578

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/RestSharp.Tests.Integrated/NonProtocolExceptionHandlingTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task Handles_HttpClient_Timeout_Error() {
3838
var response = await client.ExecuteAsync(request);
3939

4040
response.ErrorException.Should().BeOfType<TaskCanceledException>();
41-
response.ResponseStatus.Should().Be(ResponseStatus.TimedOut);
41+
response.ResponseStatus.Should().Be(ResponseStatus.TimedOut, response.ErrorMessage);
4242
}
4343

4444
[Fact]

test/RestSharp.Tests.Integrated/RequestTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public async Task Can_Timeout_GET_Async() {
5959

6060
var response = await _client.ExecuteAsync(request);
6161

62-
Assert.Equal(ResponseStatus.TimedOut, response.ResponseStatus);
62+
response.ResponseStatus.Should().Be(ResponseStatus.TimedOut, response.ErrorMessage);
6363
}
6464

6565
[Fact]

0 commit comments

Comments
 (0)