Exemplo n.º 1
0
        public async Task DeclareAndDeleteExchangeNotExistsAfterWards()
        {
            IBunny    bunny   = Bunny.ConnectSingle(ConnectSimple.BasicAmqp);
            IExchange declare = bunny.Setup()
                                .Exchange("to-delete-ex", "fanout");

            await declare.DeclareAsync();

            bool exists = await declare.ExchangeExistsAsync(declare.Name);

            Assert.True(exists);
            await declare.DeleteExchangeAsync(declare.Name);

            exists = await declare.ExchangeExistsAsync(declare.Name);

            Assert.False(exists);
        }