MessagingTests WhenTwoServersExistMessagesAreSentToTheCorrectOne 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 WhenTwoServersExistMessagesAreSentToTheCorrectOne()
Examples

[Test, CloseAfterFirstFrame]
public void WhenTwoServersExistMessagesAreSentToTheCorrectOne()
{
    if (!StackTraceExtensions.IsStartedFromNCrunch())
        return; //ncrunch: no coverage
    MessagingSession serverSession2 = Messaging.StartSession(Port + 1);
    MessagingSession clientSession2 = Messaging.JoinSession(Address, Port + 1);
    clientSession.SendMessage("first");
    clientSession2.SendMessage("second");
    Assert.AreEqual("first", serverSession.GetMessages()[0].Data);
    Assert.AreEqual("second", serverSession2.GetMessages()[0].Data);
}
See Also