NetworkServerTest: reuse CreateLocalConnectionPair

This commit is contained in:
vis2k 2021-06-15 16:50:23 +08:00
parent bf7250c096
commit 855e0017c8

View File

@ -959,10 +959,7 @@ public void NoExternalConnectionsTest_WithHostOnly()
[Test]
public void NoExternalConnectionsTest_WithHostAndConnection()
{
LocalConnectionToServer connectionToServer = new LocalConnectionToServer();
LocalConnectionToClient connectionToClient = new LocalConnectionToClient();
connectionToServer.connectionToClient = connectionToClient;
connectionToClient.connectionToServer = connectionToServer;
CreateLocalConnectionPair(out LocalConnectionToClient connectionToClient, out _);
NetworkServer.SetLocalConnection(connectionToClient);
NetworkServer.connections.Add(0, connectionToClient);