Test ClientDisconnect

This commit is contained in:
Paul Pacheco 2019-12-23 17:37:50 -06:00
parent 947c473a3d
commit ad115af845
2 changed files with 12 additions and 1 deletions

View File

@ -95,7 +95,7 @@ public override bool ClientConnected()
public override void ClientDisconnect() public override void ClientDisconnect()
{ {
if (available != null) if ((object)available != null)
available.ClientDisconnect(); available.ClientDisconnect();
} }

View File

@ -103,5 +103,16 @@ public void TestConnected()
Assert.That(transport.ClientConnected()); Assert.That(transport.ClientConnected());
} }
[Test]
public void TestDisconnect()
{
transport1.Available().Returns(true);
transport.ClientConnect("some.server.com");
transport.ClientDisconnect();
transport1.Received().ClientDisconnect();
}
} }
} }