-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlMapper.GridReader constructor is internal and prevents mocking #1338
Comments
If there is a good reason to keep the constructor internal then please say so and close this issue. The issue is now like 1,5 years open... |
Since my original post, I've added a wrapper class around everything Dapper, and set up my tests to mock against that. |
@dreymers-goformz I am having the same issue. Can you please post a couple of examples you wrote to wrap Dapper? |
This is my approach and example code of wrapper. Please have a look at my comments and the below links. Then you could build Wrappers for QueryMultiple: I can think of 2 cons of this approach:
Interface IDapperWrapper
The DapperWrapper class
|
It would be great if the SqlMapper.GridReader constructor were changed to be public - then I'd be able to include QueryMultiple with the rest of my mocking for Dapper in my unit and integration tests.
The text was updated successfully, but these errors were encountered: