mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Test ClientDisconnect
This commit is contained in:
parent
947c473a3d
commit
ad115af845
@ -95,7 +95,7 @@ public override bool ClientConnected()
|
||||
|
||||
public override void ClientDisconnect()
|
||||
{
|
||||
if (available != null)
|
||||
if ((object)available != null)
|
||||
available.ClientDisconnect();
|
||||
}
|
||||
|
||||
|
@ -103,5 +103,16 @@ public void TestConnected()
|
||||
|
||||
Assert.That(transport.ClientConnected());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDisconnect()
|
||||
{
|
||||
transport1.Available().Returns(true);
|
||||
transport.ClientConnect("some.server.com");
|
||||
|
||||
transport.ClientDisconnect();
|
||||
|
||||
transport1.Received().ClientDisconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user