Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better assert description
  • Loading branch information
pavelsavara committed Aug 25, 2021
commit 7959d022f71ca0ed7008820ce45e530126867ea7
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ await SendAsync(
"ReceiveAsync"),
ex.Message);

Assert.Equal(WebSocketState.Aborted, cws.State);
Assert.True(WebSocketState.Aborted == cws.State, cws.State+" state when InvalidOperationException");
}
else if (ex is WebSocketException)
{
// Multiple cases.
Assert.Equal(WebSocketState.Aborted, cws.State);
Assert.True(WebSocketState.Aborted == cws.State, cws.State + " state when WebSocketException");

WebSocketError errCode = (ex as WebSocketException).WebSocketErrorCode;
Assert.True(
Expand All @@ -269,7 +269,7 @@ await SendAsync(
}
else if (ex is OperationCanceledException)
{
Assert.Equal(WebSocketState.Aborted, cws.State);
Assert.True(WebSocketState.Aborted == cws.State, cws.State + " state when OperationCanceledException");
}
else
{
Expand Down