3

Im looking for assistance in writing unit tests for kafka in dotnet. Confluent seems to provide a Mocks for producers and consumers in Java only.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
ComeIn
  • 1,519
  • 17
  • 12

1 Answers1

1

Confluent uses Docker Compose to start actual brokers (at least for integration tests)

You may also look through the unit tests folder for their own code

https://github.com/confluentinc/confluent-kafka-dotnet/tree/master/test

They tried to use Moq mocking library against IProducer, but that code is commented - https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/test/Confluent.Kafka.UnitTests/MoqExample.cs

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245