How do I Moq IFindFluent so this call to ToListAsync works?
问题 I am unit testing a wrapper to the MongoDB C# driver. I have this line of code: Collection.Find(predicate).ToListAsync(); Where Collection is of type IMongoCollection<T> and Find(predicate) returns an instance implementing IFindFluent<T, T> . ToListAsync() is an extension to turn the results into a list, I assume. I am attempting to write unit tests, and I am stumped on handling this. I can't make a wrapper class because that's what I'm working on. I would prefer to either make it so