I've got a class that I'm trying to unit test but it uses a DaprClient object (from the SDK), which doesn't work in my unit test envioronment. I would like to create a mock and use that instead but the only interface DaprClient implements is IDisposable.
Is there a way to mock DaprClient for unit tests?
The only solution I can think of would be to wrap DaprClient in a class with an interface and use this wrapper everywhere. This just feels really messy and will need the wrapper to be updated every time I want to use a new method on the DaprClient.
I'm open to other solutions which might bypass the problem but I'd prefer a simple replace with mock type approach.
I'm using .Net 5, xUnit and Moq in Visual Studio 2019 on Windows (although some team members use Macs so it needs to work on both platforms).
In this particular instance, I'm using the DaprClient.GetBulkSecretAsync method but I'd like a solution that I can use elsewhere, if possible.