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.
Asked
Active
Viewed 2,678 times
3
-
Did you find solution to this issue? – Vinit Divekar Apr 14 '23 at 04:19
1 Answers
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