How would I use Moq for a FindWhere method?
I'm using Moq with a MVC3 project and EF (code first). I currently have a Mock setup like so

        (In Repository)
        IQueryable<T> FindAll();
        IQueryable<T> FindWhere(Expression<Func<T, bool>> predicate);

        (In Mock tests)

        _providerRepository.Setup(mr => mr.FindById(
        It.IsAny<int>())).Returns((int i) => _providerData.Where(
        x => x.Id == i).Single());

which works fine, my question is what would a sample Mock for FindWhere(..  look like?




      

    

thanks
    

How would I use Moq for a FindWhere method?
===

I'm using Moq with a MVC3 project and EF (code first). I currently have a Mock setup like so

        (In Repository)
        IQueryable<T> FindAll();
        IQueryable<T> FindWhere(Expression<Func<T, bool>> predicate);

        (In Mock tests)

        _providerRepository.Setup(mr => mr.FindById(
        It.IsAny<int>())).Returns((int i) => _providerData.Where(
        x => x.Id == i).Single());

which works fine, my question is what would a sample Mock for FindWhere(..  look like?




      

    

thanks
    
