Inheritance Hierarchy
DeltaEngine.Networking.Tests OnlineServiceConnectionTests
Namespace: DeltaEngine.Networking.Tests
Assembly: DeltaEngine.Networking.Tests (in DeltaEngine.Networking.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The OnlineServiceConnectionTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
OnlineServiceConnectionTests | Initializes a new instance of the OnlineServiceConnectionTests class |
Methods
Name | Description | |
---|---|---|
ClientGetsConnectedAndSendsLoginRequest | ||
ConnectToInvalidServerShouldTimeOut | ||
ReceiveResultFromServer |
Examples
[Test] public void ClientGetsConnectedAndSendsLoginRequest() { string errorReceived = ""; bool readyReceived = false; var connection = new OnlineServiceConnection(new MockSettings(), () => { });
[Test] public void ConnectToInvalidServerShouldTimeOut() { bool timedOut = false; var connection = new OnlineServiceConnection(); connection.Connect("localhost", 12345, () => timedOut = true); Thread.Sleep((int)((connection.Timeout + 0.5f) * 1000)); Assert.IsTrue(timedOut); Assert.IsFalse(connection.IsLoggedIn); }
[Test] public void ReceiveResultFromServer() { var connection = new OnlineServiceConnection(new MockSettings(), () => { });
See Also