How to use mongocxx cursor without connecting to physical server for test purpose

Hi @Yudong_Sun

As far as I know, this isn’t feasible. cursor.begin() actually iterates the cursor.

You could consider catching the exception and just ignoring it.