public async Task CreateIfNotExists()
        {
            var random = new Random();
            var name = string.Format("a{0}b", random.Next());
            var q = new BusQueue(name, connection);
            var result = await q.CreateIfNotExists();
            Assert.IsTrue(result);
            result = await q.CreateIfNotExists();
            Assert.IsFalse(result);

            await q.Delete();
        }
Ejemplo n.º 2
0
        public async Task CreateIfNotExists()
        {
            var random = new Random();
            var name   = string.Format("a{0}b", random.Next());
            var q      = new BusQueue(name, Configuration.ConnectionString);
            var result = await q.CreateIfNotExists();

            Assert.IsTrue(result);
            result = await q.CreateIfNotExists();

            Assert.IsFalse(result);

            await q.Delete();
        }
Ejemplo n.º 3
0
        public async Task Delete()
        {
            var bq = new BusQueue(name, Configuration.ConnectionString);

            await bq.Delete();

            var result = await bq.CreateIfNotExists();

            Assert.IsTrue(result);

            await bq.Delete();

            result = await bq.CreateIfNotExists();

            Assert.IsTrue(result);

            await bq.Delete();
        }
Ejemplo n.º 4
0
        public void Setup()
        {
            var random = new Random();

            name = string.Format("a{0}b", random.Next());

            var bq = new BusQueue(name, Configuration.ConnectionString);

            bq.CreateIfNotExists().Wait();

            sender = new BusQueueSender(name, Configuration.ConnectionString);

            reciever = new BusQueueReciever(name, Configuration.ConnectionString);
        }