public void Equals_SameEndpointInstance_IsTrue() { var endpoint = new KafkaConsumerEndpoint("endpoint") { Configuration = new KafkaConsumerConfig { AutoCommitIntervalMs = 1000 } }; endpoint.Equals(endpoint).Should().BeTrue(); }
public void Equals_SameEndpointInstance_TrueIsReturned() { var endpoint = new KafkaConsumerEndpoint("topic") { Configuration = { AutoCommitIntervalMs = 1000 } }; endpoint.Equals(endpoint).Should().BeTrue(); }
public void Equals_DifferentConfiguration_IsFalse() { var endpoint1 = new KafkaConsumerEndpoint("endpoint") { Configuration = new KafkaConsumerConfig { AutoCommitIntervalMs = 1000 } }; var endpoint2 = new KafkaConsumerEndpoint("endpoint") { Configuration = new KafkaConsumerConfig { BrokerAddressTtl = 2000 } }; endpoint1.Equals(endpoint2).Should().BeFalse(); }
public void Equals_SameConfiguration_IsTrue() { var endpoint1 = new KafkaConsumerEndpoint("endpoint") { Configuration = new KafkaConsumerConfig { AutoCommitIntervalMs = 1000 } }; var endpoint2 = new KafkaConsumerEndpoint("endpoint") { Configuration = new KafkaConsumerConfig { AutoCommitIntervalMs = 1000 } }; endpoint1.Equals(endpoint2).Should().BeTrue(); }
public void Equals_DifferentTopic_FalseIsReturned() { var endpoint1 = new KafkaConsumerEndpoint("topic") { Configuration = { AutoCommitIntervalMs = 1000 } }; var endpoint2 = new KafkaConsumerEndpoint("topic2") { Configuration = { AutoCommitIntervalMs = 1000 } }; endpoint1.Equals(endpoint2).Should().BeFalse(); }