Moq.Dapper icon indicating copy to clipboard operation
Moq.Dapper copied to clipboard

Moq extensions for Dapper methods.

Results 45 Moq.Dapper issues
Sort by recently updated
recently updated
newest added

When setting up QueryAsync with type nothing is ever returned. Does the current library not support this? This is the line of code returning nothing for me. mockDb.MockDbConnection.SetupDapperAsync(c => c.QueryAsync(It.IsAny(),...

This pull request adds support for: - returning strings from first/singleordefault queries - add null returns for reference types for first/singleordefault queries It does this by modifying the ObjectExtensions to...

Because a string is an IEnumerable of char when having a result of type string results in: System.AggregateException : One or more errors occurred. (Sequence contains no elements) ----> System.InvalidOperationException...

If I call a query with parameters is there currently anyway to access those values in the `ReturnsAsync` method? I need to access the data in my tests and store...

I have tried to attach a callback method to assert generated SQL sent. ``` connectionMock .SetupDapperAsync(x => x.QueryAsync( It.IsAny(), It.IsAny(), null, null, null)) .Callback( (string sql, Parameters, IDbTransaction transaction, int?...

Thank you for publishing this project. Does it support [Dapper QueryMultipleAsync](http://dapper-tutorial.net/async#querymultipleasync)? I am happy to help with this. I would really appreciate if you can point out some directions 😄.

Currently there is no support for Dynamic Parameters. Dapper uses a different code path for this object type over the anonymous object type. Additionally, it uses an outputCallback to fill...

I am attempting to test a feature that relies on multiple QueryAsync; however, when apply the second setup, it overrides the first mock setup, even if T is different. I...

I have problem. I want to use mock of IDbConnection with setup of QuerySingleOrDefault to return null. I cant do this because i get error "Non-static method requires a target"....

I want to mock both QuerySingle and Execute functions. Mocking 'Execute' after QuerySingle throws error. The error says **Message:** - System.NullReferenceException : Object reference not set to an instance of...