Open deva7mad opened 2 years ago
Is this simply a usage question or do you believe this is a bug in Moq?
That repro code is rather non-minimal. Is there any chance you could trim that down any further, @deva7mad? If not, it would help if you could provide this as a VS project so we don't need to piece this together ourselves.
The problem is when I try to mock any method of the repository, for example
GetFirstOne
, it always returnnull
during debugging.C# mocking generic repository, unitOfWork and applying filter expression return exception that because repository always returns null
Method in service class that I wrote test for it:
Implementation of
UserOfMobileQueryCriteria
method:Implementation of
GetFirstOne
method:Test:
IUserUnitOfWork
&UserUnitOfWork
Result exception: