Mocking and IQueryable <T>
I had a problem trying to test the following NHibernate based IRepository:
public class NHibernateRepository<T>: Disposable, IRepository<T> where T : IdentifiableObject { ... public IQueryable<T> Query() { return NHibernateSession.Linq<T>(); } } How in hell to mock the return of IQueryable<T> in the form in which it returns this collection in exchange for a specific expression. I feel like I have some misunderstanding of IQueryable<T> ...
+4