public void PublishQueuedMessages()
        {
            var events = _eventToPublishRepository
                         .GetEventsAwaitingPublishing()
                         .Select(eventToPublish => _eventToPublishSerializer.Deserialize(eventToPublish))
                         .ToList();

            _logger.Debug($"Retrieved {events.Count} events to publish to message queue.");
            PublishEvents(events);
        }
Ejemplo n.º 2
0
 private void SetupEventToPublishSerializer()
 {
     _eventToPublishSerializer = Substitute.For <IEventToPublishSerializer>();
     _eventToPublishSerializer.Deserialize(_eventToPublish).Returns(_event);
 }