mock FirstOrDefaultAsync for unit test #3305
-
hi, is there any suggestion from marten development community on unit test mocking when moving to marten7? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.