Exemple #1
0
        public void Equals_SameSerializerSettings_TrueIsReturned()
        {
            var endpoint1 = new MqttProducerEndpoint("topic")
            {
                Configuration =
                {
                    ClientId = "client1"
                },
                Serializer = new JsonMessageSerializer
                {
                    Options =
                    {
                        MaxDepth = 100
                    }
                }
            };

            var endpoint2 = new MqttProducerEndpoint("topic")
            {
                Configuration =
                {
                    ClientId = "client1"
                },
                Serializer = new JsonMessageSerializer
                {
                    Options =
                    {
                        MaxDepth = 100
                    }
                }
            };

            endpoint1.Equals(endpoint2).Should().BeTrue();
        }
Exemple #2
0
        public void Equals_SameEndpointInstance_TrueIsReturned()
        {
            var endpoint = new MqttProducerEndpoint("topic")
            {
                Configuration =
                {
                    ClientId = "client1"
                }
            };

            endpoint.Equals(endpoint).Should().BeTrue();
        }
Exemple #3
0
        public void Equals_DifferentConfiguration_FalseIsReturned()
        {
            var endpoint1 = new MqttProducerEndpoint("topic")
            {
                Configuration =
                {
                    ClientId = "client1"
                }
            };

            var endpoint2 = new MqttProducerEndpoint("topic")
            {
                Configuration =
                {
                    ClientId = "client2"
                }
            };

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