Esempio n. 1
0
        public void Equals_DifferentName_FalseIsReturned()
        {
            var endpoint1 = new RabbitQueueConsumerEndpoint("endpoint");
            var endpoint2 = new RabbitQueueConsumerEndpoint("endpoint2");

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

            endpoint.Equals(endpoint).Should().BeTrue();
        }
Esempio n. 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();
        }