I am using github.com/confluentinc/confluent-kafka-go/kafka as a package to deal with kafka.
It has functions like NewConsumer, SubscribeTopics, Poll which are not declared using interface. How do I mock them for unit testing?
I am using github.com/confluentinc/confluent-kafka-go/kafka as a package to deal with kafka.
It has functions like NewConsumer, SubscribeTopics, Poll which are not declared using interface. How do I mock them for unit testing?
How do I Mock Them for unit testing?
You cannot. Redesign your test strategy.