I don't know a good way of doing this, but what I tend to do is separate testing how the output from Get is used from how it is called (the predicate used).
So I'd start off with something like this:
[Test] public void ShouldUseObject() {
var queryResult = new EnumerableQuery<MyObject>(new[] { new MyObject() };
mockRepository.Get(null).ReturnsForAnyArgs(queryResult);
Subject.DoStuffThatCallsRepository();
// assert queryResult was used as expected
}
Then add a test for the predicate used:
[Test] public void QueryUsed() {
Func<MyObject,bool> queryUsed = null;
mockRepository.Get(Arg.Do<Expression<Func<MyObject,bool>>>(x => queryUsed = x.Compile());
Subject.DoStuffThatCallsRepository();
// test that queryUsed() predicate correctly matches/fails to match the required MyObject instances
}
A related change you could make is to expose the queries as properties somewhere and test them separately.
Hope this helps.
Regards,
David