Exemplo n.º 1
0
        public void when_header_value_parser_set_it_should_be_set_in_configuration()
        {
            var configuration = new BrokerIngressKafkaDriverConfiguration();
            var sut           = new BrokerIngressKafkaDriverConfigurator(configuration);

            sut.WithHeaderValueCodec <StabHeaderValueCodec>().Should().BeSameAs(sut);
            configuration.HeaderValueCodecType.Should().Be <StabHeaderValueCodec>();
        }
Exemplo n.º 2
0
        public void when_consumer_configurator_set_it_should_be_set_in_configuration()
        {
            var configuration = new BrokerIngressKafkaDriverConfiguration();
            var sut           = new BrokerIngressKafkaDriverConfigurator(configuration);

            sut.WithConsumerConfigurator <StabConsumerConfigurator>().Should().BeSameAs(sut);
            configuration.ConsumerConfiguratorType.Should().Be <StabConsumerConfigurator>();
        }
Exemplo n.º 3
0
        public void when_null_set_as_consumer_configuration_it_should_fail()
        {
            var    configuration = new BrokerIngressKafkaDriverConfiguration();
            var    configurator  = new BrokerIngressKafkaDriverConfigurator(configuration);
            Action sut           = () => configurator.WithConsumerConfig(consumerConfig: null);

            sut.Should().ThrowExactly <ArgumentNullException>();
        }
Exemplo n.º 4
0
        public void when_deserializer_factory_set_it_should_be_set_in_configuration()
        {
            var configuration = new BrokerIngressKafkaDriverConfiguration();
            var sut           = new BrokerIngressKafkaDriverConfigurator(configuration);

            sut.WithDeserializerFactory <StabDeserializerFactory>().Should().BeSameAs(sut);
            configuration.DeserializerFactoryType.Should().Be <StabDeserializerFactory>();
        }
Exemplo n.º 5
0
        public void when_consumer_configuration_set_it_should_be_set_in_configuration()
        {
            var configuration = new BrokerIngressKafkaDriverConfiguration();
            var sut           = new BrokerIngressKafkaDriverConfigurator(configuration);
            var expected      = new ConsumerConfig();

            sut.WithConsumerConfig(expected).Should().BeSameAs(sut);
            configuration.ConsumerConfig.Should().BeSameAs(expected);
        }