コード例 #1
0
        public void CanDelete()
        {
            var name = $"IntegrationTest_{UniqueKeyUtility.Generate()}";

            try
            {
                _messageQueueManager.Create(name, true, false);

                using (var queue = CreateLocalQueue(name, true, LocaleQueueMode.DurableCreate))
                {
                    queue.Delete();
                }

                _messageQueueManager.Exists(name, true).Should().BeFalse();
            }
            finally
            {
                _messageQueueManager.Delete(name, true);
            }
        }
コード例 #2
0
        public void CreatePublicQueueShouldWork()
        {
            var name = $"IntegrationTest_{UniqueKeyUtility.Generate()}";

            try
            {
                _messageQueueManager.Create(name, false, true).Should().NotBeNull();
                _messageQueueManager.Exists(name, false).Should().BeFalse();
            }
            finally
            {
                _messageQueueManager.Delete(name, false);
            }
        }
コード例 #3
0
        public void CreatePrivateQueueShouldCreateFirstTime()
        {
            var name = $"IntegrationTest_{UniqueKeyUtility.Generate()}";

            try
            {
                _messageQueueManager.Create(name, true, true).Should().NotBeNull();
                Assert.Throws <QueueCreateException>(() => _messageQueueManager.Create(name, true, true).Should().BeNull());
            }
            finally
            {
                _messageQueueManager.Delete(name, true);
            }
        }