Пример #1
0
 public RabbitMqMessagePublisher(
     IRabbitMqChannelProvider rabbitMqChannelProvider,
     ILogger logger)
 {
     _rabbitMqChannelProvider = rabbitMqChannelProvider;
     _logger       = logger;
     _queueBuilder = new RabbitMqDefaultQueueBuilder <T>();
 }
        public void QueueNameForFailedMessage_IsFailedMessagePlusClassName()
        {
            var builder = new RabbitMqDefaultQueueBuilder <FailedMessage <TestMessage> >();

            var queueName = builder.GetQueueName();

            Assert.AreEqual("FailedMessage<CherryPeakTrading.Infrastructure.Tests.Messaging.TestMessage>", queueName);
        }
        public void ExchangeNameIsEmpty()
        {
            var builder = new RabbitMqDefaultQueueBuilder <TestMessage>();

            var exchangeName = builder.GetExchangeName();

            Assert.AreEqual(string.Empty, exchangeName);
        }
        public void QueueNameForSimpleMessage_IsSameAsClassName()
        {
            var builder = new RabbitMqDefaultQueueBuilder <TestMessage>();

            var queueName = builder.GetQueueName();

            Assert.AreEqual("CherryPeakTrading.Infrastructure.Tests.Messaging.TestMessage", queueName);
        }