public void SetUp() { Configure.Transactions.Enable() .Advanced( settings => settings.DefaultTimeout(TimeSpan.FromSeconds(10)) .IsolationLevel(IsolationLevel.ReadCommitted) .EnableDistributedTransactions()); messageProcessorMock = new Mock<IProcessMessages>(); eventConsumerMock = new Mock<IConsumeEvents>(); messageConsumerMock = new Mock<IMessageConsumer>(); testee = new ActiveMqMessageReceiver( eventConsumerMock.Object, messageProcessorMock.Object); messageProcessorMock .Setup(mp => mp.CreateMessageConsumer(It.IsAny<string>())) .Returns(messageConsumerMock.Object); Address.InitializeLocalAddress("local"); }
public void SetUp() { Configure.Transactions.Enable() .Advanced( settings => settings.DefaultTimeout(TimeSpan.FromSeconds(10)) .IsolationLevel(IsolationLevel.ReadCommitted) .EnableDistributedTransactions()); this.messageProcessorMock = new Mock <IProcessMessages>(); this.eventConsumerMock = new Mock <IConsumeEvents>(); this.messageConsumerMock = new Mock <IMessageConsumer>(); this.testee = new ActiveMqMessageReceiver( this.eventConsumerMock.Object, this.messageProcessorMock.Object); this.messageProcessorMock .Setup(mp => mp.CreateMessageConsumer(It.IsAny <string>())) .Returns(this.messageConsumerMock.Object); Address.InitializeLocalAddress("local"); }