Ejemplo n.º 1
0
        public async Task SetNotificationAdressAsync_Updated(string qeueuName, string naBase, string na1, string na2)
        {
            PassiveMqQueuClient client = this.Account.CreateQueueClient(qeueuName);

            try
            {
                await client.CrateIfNotExists(null, naBase);

                Queu info = await client.GetDefinition();

                Assert.AreEqual(naBase, info.NotificationAdress);

                await client.SetNotificationAdress(na1);

                Queu info1 = await client.GetDefinition();

                Assert.AreEqual(na1, info1.NotificationAdress);

                await client.SetNotificationAdress(na2);

                Queu info2 = await client.GetDefinition();

                Assert.AreEqual(na2, info2.NotificationAdress);
            }
            finally
            {
                await client.DeleteIfExists();
            }
        }
Ejemplo n.º 2
0
        public async Task GetDefinitionAsync_Get(string qeueuName, string topic, string notificationAdress)
        {
            PassiveMqQueuClient client = this.Account.CreateQueueClient(qeueuName);

            try
            {
                await client.CrateIfNotExists(topic, notificationAdress);

                Queu info = await client.GetDefinition();

                Assert.AreEqual(qeueuName, info.Name);
                Assert.AreEqual(topic, info.TopicPattern);
                Assert.AreEqual(notificationAdress, info.NotificationAdress);

                Assert.AreNotEqual(Guid.Empty, info.Id);
                Assert.AreNotEqual(default(DateTime), info.Created);
            }
            finally
            {
                await client.DeleteIfExists();
            }
        }