mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-17 23:03:46 +01:00
---
This commit is contained in:
@@ -731,7 +731,7 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
|
||||
public async Task WithWebSocketProxy_Should_Proxy_Multiple_Messages()
|
||||
{
|
||||
// Arrange - Start target echo server
|
||||
using var targetServer = WireMockServer.Start(new WireMockServerSettings
|
||||
var targetServer = WireMockServer.Start(new WireMockServerSettings
|
||||
{
|
||||
Logger = new TestOutputHelperWireMockLogger(output),
|
||||
Urls = ["ws://localhost:0"]
|
||||
@@ -779,13 +779,16 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
|
||||
}
|
||||
|
||||
await client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Test complete", _ct);
|
||||
|
||||
targetServer.Stop();
|
||||
targetServer.Dispose();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task WithWebSocketProxy_Should_Proxy_Binary_Messages()
|
||||
{
|
||||
// Arrange - Start target echo server
|
||||
using var targetServer = WireMockServer.Start(new WireMockServerSettings
|
||||
var targetServer = WireMockServer.Start(new WireMockServerSettings
|
||||
{
|
||||
Logger = new TestOutputHelperWireMockLogger(output),
|
||||
Urls = ["ws://localhost:0"]
|
||||
@@ -832,5 +835,9 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
|
||||
receivedData.Should().BeEquivalentTo(testData, "binary data should be proxied and echoed back");
|
||||
|
||||
await client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Test complete", _ct);
|
||||
|
||||
|
||||
targetServer.Stop();
|
||||
targetServer.Dispose();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user