summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/mock/mock_dbclient_cursor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/mock/mock_dbclient_cursor.h')
-rw-r--r--src/mongo/dbtests/mock/mock_dbclient_cursor.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/mongo/dbtests/mock/mock_dbclient_cursor.h b/src/mongo/dbtests/mock/mock_dbclient_cursor.h
index 22fec61898b..19ba5515c76 100644
--- a/src/mongo/dbtests/mock/mock_dbclient_cursor.h
+++ b/src/mongo/dbtests/mock/mock_dbclient_cursor.h
@@ -35,25 +35,24 @@
namespace mongo {
+/**
+ * Simple adapter class for mongo::DBClientMockCursor to mongo::DBClientCursor.
+ * Only supports more and next, the behavior of other operations are undefined.
+ */
+class MockDBClientCursor : public mongo::DBClientCursor {
+public:
+ MockDBClientCursor(mongo::DBClientBase* client, const mongo::BSONArray& mockCollection);
+
+ bool more();
+
/**
- * Simple adapter class for mongo::DBClientMockCursor to mongo::DBClientCursor.
- * Only supports more and next, the behavior of other operations are undefined.
+ * Note: has the same contract as DBClientCursor - returned BSONObj will
+ * become invalid when this cursor is destroyed.
*/
- class MockDBClientCursor: public mongo::DBClientCursor {
- public:
- MockDBClientCursor(mongo::DBClientBase* client,
- const mongo::BSONArray& mockCollection);
-
- bool more();
-
- /**
- * Note: has the same contract as DBClientCursor - returned BSONObj will
- * become invalid when this cursor is destroyed.
- */
- mongo::BSONObj next();
-
- private:
- std::unique_ptr<mongo::DBClientMockCursor> _cursor;
- mongo::BSONObj _resultSet;
- };
+ mongo::BSONObj next();
+
+private:
+ std::unique_ptr<mongo::DBClientMockCursor> _cursor;
+ mongo::BSONObj _resultSet;
+};
}