public void ExchangeDeleteNoWait_removes_the_exchange_if_it_exists(bool ifUnused)
        {
            var server = new RabbitServer();

            using (var model = new FakeModel(server))
            {
                const string exchangeName = "someExchange";
                model.ExchangeDeclare(exchangeName, "someType");
                model.ExchangeDeleteNoWait(exchange: exchangeName, ifUnused: ifUnused);
                Assert.Empty(server.Exchanges);
            }
        }
Example #2
0
        public void ExchangeDeleteNoWait_ExchangeExists_RemovesTheExchange(bool ifUnused)
        {
            // Arrange
            var node = new RabbitServer();

            using (var model = new FakeModel(node))
            {
                const string exchangeName = "someExchange";
                model.ExchangeDeclare(exchangeName, "someType");

                // Act
                model.ExchangeDeleteNoWait(exchange: exchangeName, ifUnused: ifUnused);

                // Assert
                Assert.Empty(node.Exchanges);
            }
        }