I\'m sorry but I\'m new to repositories patterns, unit tests and orm tools.
I\'ve been researching on unit tests and the repository pattern, and arrived at some conc
When Unit Testing you need to be clear what "Unit" you are testing. You mock things that are outside of your Unit while you test your Unit. Things you mock may themselves be tested separately.
There's another kind of testing where you test larger pieces. So you might test your code + repository + database. There's value in that but it's not testing the same things. In particular when using a real database it's harder to force your code down some error paths.
Should you test {your code + repository} and mock the database? Depends how complex and how well-tested the repository is in its own right.