mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkServerTest: RemoveConnection cleanup
This commit is contained in:
parent
86f83da2d9
commit
42de58c9e9
@ -308,19 +308,14 @@ public void RemoveConnection()
|
||||
{
|
||||
// listen
|
||||
NetworkServer.Listen(1);
|
||||
Assert.That(NetworkServer.connections.Count, Is.EqualTo(0));
|
||||
|
||||
// add connection
|
||||
NetworkConnectionToClient conn42 = new NetworkConnectionToClient(42, false);
|
||||
bool result42 = NetworkServer.AddConnection(conn42);
|
||||
Assert.That(result42, Is.True);
|
||||
Assert.That(NetworkServer.AddConnection(conn42), Is.True);
|
||||
Assert.That(NetworkServer.connections.Count, Is.EqualTo(1));
|
||||
Assert.That(NetworkServer.connections.ContainsKey(42), Is.True);
|
||||
Assert.That(NetworkServer.connections[42], Is.EqualTo(conn42));
|
||||
|
||||
// remove connection
|
||||
bool resultRemove = NetworkServer.RemoveConnection(42);
|
||||
Assert.That(resultRemove, Is.True);
|
||||
Assert.That(NetworkServer.RemoveConnection(42), Is.True);
|
||||
Assert.That(NetworkServer.connections.Count, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user