Closed brucesun closed 1 month ago
Hey, please use Discord for questions instead of GitHub issues if you don't mind.
And I very, very strongly recommend against ever trying to mock the LINQ support in unit tests. Either do some kind of separation in code so you don't need that, or use integration tests.
hi, we was using marten 5 in our application and we have IMartenQueryable interface mocked so we can pass the code execution of documentSession.Query().FirstOrDefaultAsync() in the unit test.
recently we trying to upgrade to marten 7, apparently FirstOrDefaultAsync is moved from IMartenQueryable interface into the extension method of MartenLinqQueryable which cannot be mocked.
is there any suggestion from marten development community on unit test mocking when moving to marten7? is there real need to move these methods out of IMartenQueryable interface, is it possible to move them back in future release for the ease of unit test?
thanks