public void DeleteQueueWorksAsExpected()
        {
            // --- Arrange
            var testProvider = new MemoryNamedQueueProvider();
            testProvider.CreateQueue("queue1");

            // --- Act
            var count1 = testProvider.ListQueues().Count();
            testProvider.DeleteQueue("queue2");
            var count2 = testProvider.ListQueues().Count();
            testProvider.DeleteQueue("queue1");
            var count3 = testProvider.ListQueues().Count();

            // --- Assert
            count1.ShouldEqual(1);
            count2.ShouldEqual(1);
            count3.ShouldEqual(0);
        }
Esempio n. 2
0
        public void DeleteQueueWorksAsExpected()
        {
            // --- Arrange
            var testProvider = new MemoryNamedQueueProvider();

            testProvider.CreateQueue("queue1");

            // --- Act
            var count1 = testProvider.ListQueues().Count();

            testProvider.DeleteQueue("queue2");
            var count2 = testProvider.ListQueues().Count();

            testProvider.DeleteQueue("queue1");
            var count3 = testProvider.ListQueues().Count();

            // --- Assert
            count1.ShouldEqual(1);
            count2.ShouldEqual(1);
            count3.ShouldEqual(0);
        }
Esempio n. 3
0
        public void ListQueuesWorksAsExpected()
        {
            // --- Arrange
            var testProvider = new MemoryNamedQueueProvider();

            testProvider.CreateQueue("queue1");
            testProvider.CreateQueue("queue2");

            // --- Act
            var queues = testProvider.ListQueues();

            // --- Assert
            // ReSharper disable PossibleMultipleEnumeration
            queues.ShouldHaveCountOf(2);
            queues.Select(q => q.Name).ShouldContain("queue1");
            queues.Select(q => q.Name).ShouldContain("queue2");
            // ReSharper restore PossibleMultipleEnumeration
        }
        public void ListQueuesWorksAsExpected()
        {
            // --- Arrange
            var testProvider = new MemoryNamedQueueProvider();
            testProvider.CreateQueue("queue1");
            testProvider.CreateQueue("queue2");

            // --- Act
            var queues = testProvider.ListQueues();

            // --- Assert
            // ReSharper disable PossibleMultipleEnumeration
            queues.ShouldHaveCountOf(2);
            queues.Select(q => q.Name).ShouldContain("queue1");
            queues.Select(q => q.Name).ShouldContain("queue2");
            // ReSharper restore PossibleMultipleEnumeration
        }