Application developers may want to test their code with simulated responses, including errors from a bigtable::Table. To do so, construct a bigtable::Table with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis document outlines the \u003ccode\u003eMockDataConnection\u003c/code\u003e class, which is designed to simulate the behavior of \u003ccode\u003egoogle::cloud::bigtable::DataConnection\u003c/code\u003e for testing purposes.\u003c/p\u003e\n"],["\u003cp\u003eApplication developers can utilize this class with the Google Test framework to mock responses and errors from a \u003ccode\u003ebigtable::Table\u003c/code\u003e, enabling comprehensive testing of their code.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMockDataConnection\u003c/code\u003e class includes numerous functions such as \u003ccode\u003eApply\u003c/code\u003e, \u003ccode\u003eBulkApply\u003c/code\u003e, \u003ccode\u003eReadRows\u003c/code\u003e, \u003ccode\u003eReadRow\u003c/code\u003e, and \u003ccode\u003eCheckAndMutateRow\u003c/code\u003e, which are implemented using gMock's \u003ccode\u003eMOCK_METHOD()\u003c/code\u003e for flexible mocking.\u003c/p\u003e\n"],["\u003cp\u003eThe document provides access to various versions of the \u003ccode\u003eMockDataConnection\u003c/code\u003e class, ranging from version 2.11.0 up to the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThere is a complete example, "Mocking the Cloud Bigtable C++ Client with Google Mock", in the documentation demonstrating how to mock \u003ccode\u003eTable\u003c/code\u003e calls using this class.\u003c/p\u003e\n"]]],[],null,[]]