예제 #1
0
        public void Validate_InvalidConfiguration_ExceptionThrown()
        {
            var endpoint = new KafkaProducerEndpoint("topic");

            Action act = () => endpoint.Validate();

            act.Should().ThrowExactly <EndpointConfigurationException>();
        }
예제 #2
0
        public void Validate_MissingTopic_ExceptionThrown()
        {
            var endpoint = new KafkaProducerEndpoint(string.Empty)
            {
                Configuration = new KafkaProducerConfig
                {
                    BootstrapServers = "test-server"
                }
            };

            Action act = () => endpoint.Validate();

            act.Should().ThrowExactly <EndpointConfigurationException>();
        }