This commit is contained in:
James Newton-King 2018-04-03 11:45:05 +12:00 committed by GitHub
parent 3460d44848
commit 416b27c6d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests
// Send a frame, then close
await feature.Client.SendAsync(
buffer: new ArraySegment<byte>(Encoding.UTF8.GetBytes("Hello")),
messageType: Enum.Parse<WebSocketMessageType>(webSocketMessageType),
messageType: (WebSocketMessageType)Enum.Parse(typeof(WebSocketMessageType), webSocketMessageType),
endOfMessage: true,
cancellationToken: CancellationToken.None);
await feature.Client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests
Assert.Equal(1, clientSummary.Received.Count);
Assert.True(clientSummary.Received[0].EndOfMessage);
Assert.Equal(Enum.Parse<WebSocketMessageType>(expectedMessageType), clientSummary.Received[0].MessageType);
Assert.Equal((WebSocketMessageType)Enum.Parse(typeof(WebSocketMessageType), expectedMessageType), clientSummary.Received[0].MessageType);
Assert.Equal("Hello", Encoding.UTF8.GetString(clientSummary.Received[0].Buffer));
}
}