Exemple #1
0
        public void BuildShouldReturnNonNullConsumer()
        {
            var kafkaOptions = Options.Create(new KafkaOptions
            {
                KafkaBootstrapServers = "kafka-bootstrap",
                ConsumerGroupId       = "test-group-id"
            });

            var sut = new KafkaConsumerBuilder(kafkaOptions);

            var consumer = sut.Build();

            Assert.NotNull(consumer);
        }
        public void Build_ShouldReturnNonNullConsumer()
        {
            //Arrange
            var kafkaOptions = Options.Create(new KafkaOptions
            {
                BootstrapServers  = "kafka-bootstrap",
                ConsumerGroupId   = "test-group-id",
                SchemaRegistryUrl = "url"
            });

            //Act
            var sut      = new KafkaConsumerBuilder <FakeAvro>(_subLogger, kafkaOptions);
            var consumer = sut.Build();

            //Assert
            Assert.NotNull(consumer);
        }