I have strange problem: when I use mu repository stub I get strange exception:
System.Reflection.TargetParameterCountException
Creating stub (in a test method):
var repositoryStub = new Mock<IRepository<User>>();
repositoryStub.Setup(m => m.FindAll(It.IsAny<Expression<Func<User,bool>>>())).Returns(TestGlobals.TestUsers.AsQueryable<User>);
Interface:
IQueryable<T> FindAll(System.Linq.Expressions.Expression<Func<T, bool>> whereExpression);
And on every call to FindAll throws that error :( I'm mocking in that fashion in many other places, but now I can't find source of that strange problem :(