public async Task DeleteRule()
        {
            var random    = new Random();
            var topicName = string.Format("a{0}b", random.Next());
            var subName   = "sub";
            var ruleName  = "rule";

            var filter = new SqlFilter("0=0");

            var client = new BusManagementClient(connection);
            await client.TopicCreate(topicName);

            await client.SubscriptionCreate(topicName, subName);

            await client.RuleCreate(topicName, subName, ruleName, filter);

            await client.RuleDelete(topicName, subName, ruleName);

            try
            {
                await client.RuleGet(topicName, subName, ruleName);

                Assert.Fail();
            }
            catch
            {
            }

            //cleanup
            await client.TopicDelete(topicName);
        }
Пример #2
0
        public void Setup()
        {
            var random = new Random();

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

            var client = new BusManagementClient(connection);

            client.TopicCreate(recieveName).Wait();
            client.SubscriptionCreate(recieveName, subName).Wait();
        }
        public async Task CreateSubscription()
        {
            var random    = new Random();
            var topicName = string.Format("a{0}b", random.Next());
            var subName   = "sub";

            var client = new BusManagementClient(connection);
            await client.TopicCreate(topicName);

            await client.SubscriptionCreate(topicName, subName);

            var exists = await client.SubscriptionExists(topicName, subName);

            Assert.IsTrue(exists);

            //cleanup
            await client.TopicDelete(topicName);
        }