コード例 #1
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();
        }
コード例 #2
0
        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();
        }
コード例 #3
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();
        }
コード例 #4
0
        public void TearDown()
        {
            var bq = new BusQueue(name, Configuration.ConnectionString);

            bq.Delete().Wait();
        }