mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Tests: SetAllClientsNotReady - don't rely on host mode
This commit is contained in:
parent
924ce2b668
commit
0d55ed8448
@ -741,20 +741,13 @@ public void SetClientReadyAndNotReady()
|
||||
[Test]
|
||||
public void SetAllClientsNotReady()
|
||||
{
|
||||
// add first ready client
|
||||
CreateLocalConnectionPair(out LocalConnectionToClient first, out _);
|
||||
first.isReady = true;
|
||||
NetworkServer.connections[42] = first;
|
||||
|
||||
// add second ready client
|
||||
CreateLocalConnectionPair(out LocalConnectionToClient second, out _);
|
||||
second.isReady = true;
|
||||
NetworkServer.connections[43] = second;
|
||||
NetworkServer.Listen(1);
|
||||
ConnectClientBlockingAuthenticatedAndReady(out NetworkConnectionToClient connectionToClient);
|
||||
Assert.That(connectionToClient.isReady, Is.True);
|
||||
|
||||
// set all not ready
|
||||
NetworkServer.SetAllClientsNotReady();
|
||||
Assert.That(first.isReady, Is.False);
|
||||
Assert.That(second.isReady, Is.False);
|
||||
Assert.That(connectionToClient.isReady, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user