예제 #1
0
        public async Task PopMessageAsync()
        {
            var rsmq = new Rsmq();
            await rsmq.CreateQueueAsync(new CreateQueueOptions { QueueName = Global.QueueName });

            var msgId = await rsmq.SendMessageAsync(new SendMessageOptions { QueueName = Global.QueueName, Message = "hello" });

            var poppedMessage = await rsmq.PopMessageAsync(new PopMessageOptions { QueueName = Global.QueueName });

            Assert.AreEqual(msgId, poppedMessage.Id);

            Assert.Zero(await rsmq.DeleteMessageAsync(new DeleteMessageOptions {
                QueueName = Global.QueueName, Id = msgId
            }));
        }