/// <summary> /// Create a work item queue that will try to pull items from a named RabbitMQ endpoint /// </summary> /// <param name="endpoint">Destination endpoint to pull messages from</param> /// <param name="messagingBase">RabbitMQ connection provider</param> /// <param name="sleeper">Sleeper to rate limit polling</param> public RabbitMqPollingNode(IRoutingEndpoint endpoint, IMessagingBase messagingBase, ISleepWrapper sleeper) { _endpoint = endpoint.ToString(); _messagingBase = messagingBase; _sleeper = sleeper; _boundMessageTypes = new ConcurrentSet<Type>(); }
public void setup() { _endpoint = Substitute.For<IRoutingEndpoint>(); _messagingBase = Substitute.For<IMessagingBase>(); _sleepWrapper = Substitute.For<ISleepWrapper>(); _endpoint.ToString().Returns(_destinationName); _subject = new RabbitMqPollingNode(_endpoint, _messagingBase, _sleepWrapper); }