public void Should_throw_exception_if_setting_null_value()
        {
            // Arrange
            ITunnelWithPrioritySupport tunnel = null;

            // Action
            tunnel.ChangePriorityQueueSuffixConvention(null);
        }
 /// <summary>
 /// By default, Burrow.NET works around the priority messages by creating different queues for different messages at different level of priority.
 /// The name for those queues will be OriginalQueueName.Priority[n], if you want to change that, implement IPriorityQueueSuffix and give it to this method
 /// before creating queues, anywhere at the very begining of the application
 /// </summary>
 /// <param name="tunnel"></param>
 /// <param name="suffix"></param>
 /// <returns></returns>
 public static ITunnelWithPrioritySupport ChangePriorityQueueSuffixConvention(this ITunnelWithPrioritySupport tunnel, IPriorityQueueSuffix suffix)
 {
     if (suffix == null)
     {
         throw new ArgumentNullException("suffix");
     }
     PriorityQueuesRabbitSetup.GlobalPriorityQueueSuffix = suffix;
     return(tunnel);
 }
        public void Should_change_the_suffix_to_new_value()
        {
            // Arrange
            var newSuffixConvention           = NSubstitute.Substitute.For <IPriorityQueueSuffix>();
            ITunnelWithPrioritySupport tunnel = null;

            // Action
            tunnel.ChangePriorityQueueSuffixConvention(newSuffixConvention);

            // Assert
            Assert.AreSame(newSuffixConvention, PriorityQueuesRabbitSetup.GlobalPriorityQueueSuffix);
            tunnel.ChangePriorityQueueSuffixConvention(new PriorityQueueSuffix());
        }