I need to write unit tests for the EventHubProducerClient class, which many instances of used in my repo. Modifying the original class is not an option. More specifically, I need to mock the CreateBatchAsync() method of the EventHubProducerClient class, as well as the SendAsync() method. Does anyone know how this can be accomplished? I am noob when it comes to mocking. Any help would be greatly appreciated, thanks
I tried creating a interface wrapper to implement the mock methods instead, but not only does this modify the original constructor, I also just couldn't get it to work. If you have any advice or solutions that would be very helpful (with code examples).