Class MockDebugger2Connection (2.11.0)

A class to mock Debugger2Connection.

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.

Returns
TypeDescription
Options

virtual SetBreakpoint(google::devtools::clouddebugger::v2::SetBreakpointRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::devtools::clouddebugger::v2::SetBreakpointRequest const &
Returns
TypeDescription
StatusOr< google::devtools::clouddebugger::v2::SetBreakpointResponse >

virtual GetBreakpoint(google::devtools::clouddebugger::v2::GetBreakpointRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::devtools::clouddebugger::v2::GetBreakpointRequest const &
Returns
TypeDescription
StatusOr< google::devtools::clouddebugger::v2::GetBreakpointResponse >

virtual DeleteBreakpoint(google::devtools::clouddebugger::v2::DeleteBreakpointRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::devtools::clouddebugger::v2::DeleteBreakpointRequest const &
Returns
TypeDescription
Status

virtual ListBreakpoints(google::devtools::clouddebugger::v2::ListBreakpointsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::devtools::clouddebugger::v2::ListBreakpointsRequest const &
Returns
TypeDescription
StatusOr< google::devtools::clouddebugger::v2::ListBreakpointsResponse >

virtual ListDebuggees(google::devtools::clouddebugger::v2::ListDebuggeesRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::devtools::clouddebugger::v2::ListDebuggeesRequest const &
Returns
TypeDescription
StatusOr< google::devtools::clouddebugger::v2::ListDebuggeesResponse >