Esempio n. 1
0
        public async Task Invoking_pipeline_calls_configured_middleware()
        {
            TestKafkaConfig testConfig = InitialiseSut();

            var kafkaMessage = new ConsumeResult <string, string>();

            await _sut.InvokePipeline(kafkaMessage);

            var actual = testConfig.MessagesReceived.Single();

            Assert.Same(kafkaMessage, actual.GetKafkaMessage <string, string>());
        }
Esempio n. 2
0
        private TestKafkaConfig InitialiseSut()
        {
            _serviceProvider.Container.Add(
                typeof(IPipelineBuilder),
                new PipelineBuilder(_serviceProvider, new FakeLogger <PipelineBuilder>())
                );

            var testConfig = new TestKafkaConfig();

            _sut.Initialise(testConfig);

            return(testConfig);
        }