Class MockCloudControlsPartnerCoreConnection (2.29.0)

A class to mock CloudControlsPartnerCoreConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type CloudControlsPartnerCoreClient. To do so, construct an object of type CloudControlsPartnerCoreClient 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
Type Description
Options

virtual GetWorkload(google::cloud::cloudcontrolspartner::v1::GetWorkloadRequest const &)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::GetWorkloadRequest const &
Returns
Type Description
StatusOr< google::cloud::cloudcontrolspartner::v1::Workload >

virtual ListWorkloads(google::cloud::cloudcontrolspartner::v1::ListWorkloadsRequest)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::ListWorkloadsRequest
Returns
Type Description
StreamRange< google::cloud::cloudcontrolspartner::v1::Workload >

virtual GetCustomer(google::cloud::cloudcontrolspartner::v1::GetCustomerRequest const &)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::GetCustomerRequest const &
Returns
Type Description
StatusOr< google::cloud::cloudcontrolspartner::v1::Customer >

virtual ListCustomers(google::cloud::cloudcontrolspartner::v1::ListCustomersRequest)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::ListCustomersRequest
Returns
Type Description
StreamRange< google::cloud::cloudcontrolspartner::v1::Customer >

virtual GetEkmConnections(google::cloud::cloudcontrolspartner::v1::GetEkmConnectionsRequest const &)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::GetEkmConnectionsRequest const &
Returns
Type Description
StatusOr< google::cloud::cloudcontrolspartner::v1::EkmConnections >

virtual GetPartnerPermissions(google::cloud::cloudcontrolspartner::v1::GetPartnerPermissionsRequest const &)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::GetPartnerPermissionsRequest const &
Returns
Type Description
StatusOr< google::cloud::cloudcontrolspartner::v1::PartnerPermissions >

virtual ListAccessApprovalRequests(google::cloud::cloudcontrolspartner::v1::ListAccessApprovalRequestsRequest)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::ListAccessApprovalRequestsRequest
Returns
Type Description
StreamRange< google::cloud::cloudcontrolspartner::v1::AccessApprovalRequest >

virtual GetPartner(google::cloud::cloudcontrolspartner::v1::GetPartnerRequest const &)

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

Parameter
Name Description
request google::cloud::cloudcontrolspartner::v1::GetPartnerRequest const &
Returns
Type Description
StatusOr< google::cloud::cloudcontrolspartner::v1::Partner >