Application developers may want to test their code with simulated responses, including errors, from an object of type Debugger2Client. To do so, construct an object of type Debugger2Client with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.
See Also
This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.
Functions
virtual options()
This function is implemented using gMock's MOCK_METHOD().
Consult the gMock documentation to use this mock in your tests.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eMockDebugger2Connection\u003c/code\u003e class, which is designed to simulate responses and errors for the \u003ccode\u003eDebugger2Client\u003c/code\u003e during application testing.\u003c/p\u003e\n"],["\u003cp\u003eApplication developers can utilize this mock class to test code interactions with the \u003ccode\u003eDebugger2Client\u003c/code\u003e by programming the desired behavior through the Google Test framework.\u003c/p\u003e\n"],["\u003cp\u003eThe mock class implements several key functions, including \u003ccode\u003eSetBreakpoint\u003c/code\u003e, \u003ccode\u003eGetBreakpoint\u003c/code\u003e, \u003ccode\u003eDeleteBreakpoint\u003c/code\u003e, \u003ccode\u003eListBreakpoints\u003c/code\u003e, and \u003ccode\u003eListDebuggees\u003c/code\u003e, all of which are built using gMock's \u003ccode\u003eMOCK_METHOD()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe available mock functions allow testers to mock the behaviour of the real functions, having the ability to control the return and parameter values.\u003c/p\u003e\n"],["\u003cp\u003eA link is provided to another example that showcases the use of GoogleTest when working with a different library.\u003c/p\u003e\n"]]],[],null,[]]