예제 #1
0
        public async Task Broadcast_GivenMessage_RelaysMessageToSubscribers()
        {
            _relay.AddSubscriber(_spySubscriber);
            _relay.Broadcast(_message);
            await _relay.Complete();

            var receivedMessage = _spySubscriber.ReceivedMessages.Single();

            Assert.That(receivedMessage.Body, Is.EqualTo(_message.Body));
        }
예제 #2
0
 public void BroadcastSingleMessage()
 {
     _relay.Broadcast(_message);
 }
예제 #3
0
 void Update()
 {
     connection.Send(Relay.Broadcast(header, content));
 }