Example #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));
        }