Are there any ways to use Moq with the IAdminClient extension methods? I am trying to test code that has a admin client calling DescribeTopicsAsync but can't mock due to it being an extension method.
How to reproduce
latest confluent nuget package.
var mockedAdminClient = new Mock<IAdminClient>();
mockedAdminClient.Setup(x => x.DescribeTopicsAsync(arguments);
//fails because `DescribeTopicsAsync` is static method.
AdminClient is internal, but DescribeTopicsAsync just turns around and calls the same method on the class
Checklist
Please provide the following information:
[ ] A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
[x ] Confluent.Kafka nuget version.
[ ] Apache Kafka version.
[ ] Client configuration.
[ ] Operating system.
[ ] Provide logs (with "debug" : "..." as necessary in configuration).
Description
Are there any ways to use Moq with the
IAdminClient
extension methods? I am trying to test code that has a admin client callingDescribeTopicsAsync
but can't mock due to it being an extension method.How to reproduce
latest confluent nuget package.
AdminClient
is internal, but DescribeTopicsAsync just turns around and calls the same method on the classChecklist
Please provide the following information: