Skip to content

mock FirstOrDefaultAsync for unit test #3305

Answered by jeremydmiller
brucesun asked this question in General
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mysticmind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3303 on July 10, 2024 13:58.