Inheritance: ITopology
        public void ShouldVisitTopologyMultipleTimesExclusiveQueue()
        {
            var factory = new DefaultConnectionFactory();
            using (var connection = factory.Create(new Uri("amqp://localhost/integration")))
            {
                var model = connection.CreateModel();

                var topology = new Topology();
                topology.DefineQueue();

                var builder = new TopologyBuilder(model);
                topology.Visit(builder);
                topology.Visit(builder);
            }
        }
        public void ShouldVisitExclusiveQueue()
        {
            var factory = new DefaultConnectionFactory();
            using (var connection = factory.Create(new Uri("amqp://localhost/integration")))
            {
                var model = connection.CreateModel();

                var topology = new Topology();
                var q1 = topology.DefineQueue();

                topology.Visit(new TopologyBuilder(model));

                Assert.That(q1.HasName);

                var queues = admin.Queues(IntegrationVHost);
                Assert.That(queues.Any(e => e.Name == q1.Name));
            }
        }
        public void ShouldVisitTopologyWithQueueBoundToExchange()
        {
            var factory = new DefaultConnectionFactory();
            using (var connection = factory.Create(new Uri("amqp://localhost/integration")))
            {
                var model = connection.CreateModel();

                var topology = new Topology();
                var e1 = topology.DefineExchange("exchange1", ExchangeType.Topic);
                var q1 = topology.DefineQueue("queue");

                q1.BindTo(e1);

                topology.Visit(new TopologyBuilder(model));

                var exchanges = admin.Exchanges(IntegrationVHost);
                Assert.That(exchanges.Any(e => e.Name == e1.Name));

                var queues = admin.Queues(IntegrationVHost);
                Assert.That(queues.Any(e => e.Name == q1.Name));
            }
        }