OnlineServiceConnectionTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  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

public class OnlineServiceConnectionTests

The OnlineServiceConnectionTests type exposes the following members.

Constructors

  NameDescription
Public methodOnlineServiceConnectionTests
Initializes a new instance of the OnlineServiceConnectionTests class
Top
Methods

  NameDescription
Public methodClientGetsConnectedAndSendsLoginRequest
Public methodConnectToInvalidServerShouldTimeOut
Public methodReceiveResultFromServer
Top
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