Yes,
i tried something similar, there are atleast two ways in the driver architecture to interfere:
- FieldDefinition, FilterDefinition level: Basically you can try to reverse the Filter/FieldDefinitions back to Expressiontrees then apply to a collection in memory, unfortunately the field/filterdefinitions types are mostly not public so you would need to work quite a bit with reflection or change the driver itself.
- IOperationExecutor: An interface which is used in the unit tests of driver,
https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.Tests/MockOperationExecutor.cs. This is fairly deep in the driver, I did not take a closer look into this. If you go this route you then would apply again against a collection in linq for example.
for the first way you will need to mock every of the highlevel interfaces (e.g. IMongoCollection too), for the second way it might not be necessary.
Maybe this info helps.