dapr / dapr/dotnet-sdk

Make all methods on DaprClient virtual

Open
#774 17 comments 7 reactions 0 assignees View on GitHub
breaking-change
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
1d 22h
Merged PRs (30d)
5

Description

Hello, I've recently begun evaluation and usage of Dapr and I love it. This client library is also great, however I have had some difficulty in unit testing, specifically mocks. The DaprClient does not implement an interface and thus makes unit testing a little harder. I would like to see the DaprClient implement an interface, maybe IDaprClient, so that I can mock out things like InvokeMethodAsync and PublishEventAsync to return expected test data. Moq is the library I use for mocking.

I'd be happy to hear other suggested approaches, and while I haven't worked on any GitHub projects before I would be happy to make this addition if it's deemed worthwhile. Thanks for reading.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.