public void WithPublisher_Taking_Basic_Properties_When_Called_Without_Basic_Properties_Uses_Null_As_Default()
        {
            // Arrange
            var rabbitMqDestinationBuilderMock = new Mock <IRabbitMqDestinationBuilder>();

            // Act
            IRabbitMqDestinationBuilderExtensions.WithPublisher(rabbitMqDestinationBuilderMock.Object);

            // Assert
            rabbitMqDestinationBuilderMock.Verify(x => x.WithPublisher(It.Is <BasicMessagePublisher>(p => p.BasicProperties == null)), Times.Once);
        }
        public void WithPublisher_Taking_Basic_Properties_When_Called_Calls_WithPublisher_Method_Passing_New_Created_BasicMessagePublisher_To_It()
        {
            // Arrange
            var rabbitMqDestinationBuilderMock = new Mock <IRabbitMqDestinationBuilder>();
            var basicProperties = new Mock <IBasicProperties>().Object;

            // Act
            IRabbitMqDestinationBuilderExtensions.WithPublisher(rabbitMqDestinationBuilderMock.Object, basicProperties);

            // Assert
            rabbitMqDestinationBuilderMock.Verify(x => x.WithPublisher(It.Is <BasicMessagePublisher>(p => p.BasicProperties == basicProperties)), Times.Once);
        }
        public void WithPublisher_Taking_Basic_Properties_When_Called_Returns_Result_Of_WithPublisher_Method()
        {
            // Arrange
            var rabbitMqDestinationBuilderMock = new Mock <IRabbitMqDestinationBuilder>();

            rabbitMqDestinationBuilderMock.Setup(x => x.WithPublisher(It.IsAny <IMessagePublisher>())).Returns(rabbitMqDestinationBuilderMock.Object);
            var basicProperties = new Mock <IBasicProperties>().Object;

            // Act
            var rabbitMqDestinationBuilderReturned = IRabbitMqDestinationBuilderExtensions.WithPublisher(rabbitMqDestinationBuilderMock.Object, basicProperties);

            // Assert
            Assert.AreEqual(rabbitMqDestinationBuilderReturned, rabbitMqDestinationBuilderMock.Object);
        }