NetworkServerTest: use ClientConnect so that invoked connectionId and MemoryTransport's internal connectionId match.

This commit is contained in:
vis2k 2021-05-11 18:21:03 +08:00
parent 2d24dfefbe
commit bac1f94033

View File

@ -1030,8 +1030,9 @@ public void ShutdownCleanupTest()
NetworkServer.SetLocalConnection(new LocalConnectionToClient());
Assert.That(NetworkServer.localClientActive, Is.True);
// connect
transport.OnServerConnected.Invoke(42);
// connect a client
transport.ClientConnect("localhost");
UpdateTransport();
Assert.That(NetworkServer.connections.Count, Is.EqualTo(1));
// shutdown