Exemple #1
0
        public void Equals_DifferentName_FalseIsReturned()
        {
            var endpoint1 = new RabbitQueueConsumerEndpoint("endpoint");
            var endpoint2 = new RabbitQueueConsumerEndpoint("endpoint2");

            endpoint1.Equals(endpoint2).Should().BeFalse();
        }
Exemple #2
0
        public void Equals_SameEndpointInstance_TrueIsReturned()
        {
            var endpoint = new RabbitQueueConsumerEndpoint("endpoint")
            {
                Queue = new RabbitQueueConfig
                {
                    IsDurable = false
                }
            };

            endpoint.Equals(endpoint).Should().BeTrue();
        }
Exemple #3
0
        public void Equals_DifferentConfiguration_FalseIsReturned()
        {
            var endpoint1 = new RabbitQueueConsumerEndpoint("endpoint")
            {
                Queue = new RabbitQueueConfig
                {
                    IsDurable           = false,
                    IsAutoDeleteEnabled = true,
                    IsExclusive         = true
                }
            };
            var endpoint2 = new RabbitQueueConsumerEndpoint("endpoint")
            {
                Queue = new RabbitQueueConfig
                {
                    IsDurable           = true,
                    IsAutoDeleteEnabled = false,
                    IsExclusive         = false
                }
            };

            endpoint1.Equals(endpoint2).Should().BeFalse();
        }