Closed fischero19 closed 9 months ago
Hi @fischero19 thanks for the PR. I will include it into the next release. As I understand the change should fix #68 and #64
Hi @romantitov, thanks for maintaining this lib :). I did not explicitly test the two issues, but I also think they are fixed now.
PR Details
This PR fixes ToListAsync() for mocked DbSets.
Description
In the original implementation, GetAsyncEnumerator() in BuildMockDbSet() was setup to return the current result of enumerable.GetAsyncEnumerator(). This leads to multiple issues when using ToListAsync():
This fix applies only for Moq and FakeItEasy, as the NSubsitute version already used lazy returns.
Related Issue
How Has This Been Tested
Checklist