Пример #1
0
        public void BuildsDurableQueue()
        {
            var queue = QueueBuilder.Durable("name").Build();

            Assert.True(queue.IsDurable);
            Assert.Equal("name", queue.QueueName);
        }
Пример #2
0
        public void AddsArguments()
        {
            var queue = QueueBuilder.Durable("name")
                        .WithArgument("key1", "value1")
                        .WithArgument("key2", "value2")
                        .Build();

            var args = queue.Arguments;

            Assert.Equal("value1", args["key1"]);
            Assert.Equal("value2", args["key2"]);
        }
Пример #3
0
        public void AddsMultipleArgumentsAtOnce()
        {
            var arguments = new Dictionary <string, object>
            {
                { "key1", "value1" },
                { "key2", "value2" }
            };

            var queue = QueueBuilder.Durable("name").WithArguments(arguments).Build();
            var args  = queue.Arguments;

            Assert.Equal("value1", args["key1"]);
            Assert.Equal("value2", args["key2"]);
        }
Пример #4
0
        public void BuildsExclusiveQueue()
        {
            var queue = QueueBuilder.Durable("name").Exclusive().Build();

            Assert.True(queue.IsExclusive);
        }
Пример #5
0
        public void BuildsAutoDeleteQueue()
        {
            var queue = QueueBuilder.Durable("name").AutoDelete().Build();

            Assert.True(queue.IsAutoDelete);
        }