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 conclusions, I wonder if I'm right.
The repository pattern facilitates unit testing to be replaced in controller that make use of it for example, right? Because create a stub/fake of context(in EF) or session(in NH) is harder, right? The repository itself is not tested? Why?
Using EntityFramework or NHibernate with repository pattern, if i want to test my repositories I need to do integration tests? Because if I use a fake implementation of my context/session I'm not doing real tests? Because the context/session itself is the repository (I mean they implement the real logic of Add, Remove, Edit, GetById, GetAll, ..)?
The repository pattern with EF or NH is like a wrapper? (Not only a wrapper, I know this is a import concept of the domain.)
See Question&Answers more detail:os