Esempio n. 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));
        }
Esempio n. 2
0
 public void BroadcastSingleMessage()
 {
     _relay.Broadcast(_message);
 }
Esempio n. 3
0
 void Update()
 {
     connection.Send(Relay.Broadcast(header, content));
 }