ClientTests SendTestMessageToServer Method Delta Engine Documentation

Namespace: DeltaEngine.Networking.Tests
Assembly: DeltaEngine.Networking.Tests (in DeltaEngine.Networking.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void SendTestMessageToServer()
Examples

[Test]
public void SendTestMessageToServer()
{
    var server = new MockServer();
    var client = new MockClient(server);
    client.Connect("localhost", 1);
    client.Send(new TextMessage("Hi"));
    var serverMessage = server.LastMessage as TextMessage;
    Assert.IsNotNull(serverMessage);
    Assert.AreEqual("Hi", serverMessage.Text);
}
See Also