public void SetUp() { this.messageProcessorMock = new Mock<IProcessMessages>(); this.subscriptionManagerMock = new NotifyTopicSubscriptionsMock(); this.testee = new EventConsumer(this.subscriptionManagerMock, this.messageProcessorMock.Object); }
public INotifyMessageReceived CreateMessageReceiver(Func<TransportMessage, bool> tryProcessMessage, Action<TransportMessage, Exception> endProcessMessage) { var messageProcessor = Configure.Instance.Builder.Build<IProcessMessages>(); messageProcessor.TryProcessMessage = tryProcessMessage; messageProcessor.EndProcessMessage = endProcessMessage; var subscriptionManager = Configure.Instance.Builder.Build<INotifyTopicSubscriptions>(); var eventConsumer = new EventConsumer(subscriptionManager, messageProcessor) { ConsumerName = this.ConsumerName }; var messageReceiver = new ActiveMqMessageReceiver(eventConsumer, messageProcessor); return messageReceiver; }
public INotifyMessageReceived CreateMessageReceiver(Func <TransportMessage, bool> tryProcessMessage, Action <TransportMessage, Exception> endProcessMessage) { var messageProcessor = Configure.Instance.Builder.Build <IProcessMessages>(); messageProcessor.TryProcessMessage = tryProcessMessage; messageProcessor.EndProcessMessage = endProcessMessage; var subscriptionManager = Configure.Instance.Builder.Build <INotifyTopicSubscriptions>(); var eventConsumer = new EventConsumer(subscriptionManager, messageProcessor) { ConsumerName = this.ConsumerName }; var messageReceiver = new ActiveMqMessageReceiver(eventConsumer, messageProcessor); return(messageReceiver); }