Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
Class MockServiceManagerConnection (2.41.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.41.0keyboard_arrow_down
A class to mock ServiceManagerConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type ServiceManagerClient
. To do so, construct an object of type ServiceManagerClient
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 ListServices(google::api::servicemanagement::v1::ListServicesRequest)
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::api::servicemanagement::v1::ListServicesRequest
Returns
Type
Description
StreamRange< google::api::servicemanagement::v1::ManagedService >
virtual GetService(google::api::servicemanagement::v1::GetServiceRequest 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::api::servicemanagement::v1::GetServiceRequest const &
Returns
Type
Description
StatusOr< google::api::servicemanagement::v1::ManagedService >
virtual CreateService(google::longrunning::Operation const &)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter
Name
Description
operation
google::longrunning::Operation const &
Returns
Type
Description
future< StatusOr< google::api::servicemanagement::v1::ManagedService > >
virtual DeleteService(google::longrunning::Operation const &)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter
Name
Description
operation
google::longrunning::Operation const &
Returns
Type
Description
future< StatusOr< google::api::servicemanagement::v1::OperationMetadata > >
virtual UndeleteService(google::longrunning::Operation const &)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter
Name
Description
operation
google::longrunning::Operation const &
Returns
Type
Description
future< StatusOr< google::api::servicemanagement::v1::UndeleteServiceResponse > >
virtual ListServiceConfigs(google::api::servicemanagement::v1::ListServiceConfigsRequest)
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::api::servicemanagement::v1::ListServiceConfigsRequest
Returns
Type
Description
StreamRange< google::api::Service >
virtual GetServiceConfig(google::api::servicemanagement::v1::GetServiceConfigRequest 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::api::servicemanagement::v1::GetServiceConfigRequest const &
Returns
Type
Description
StatusOr< google::api::Service >
virtual CreateServiceConfig(google::api::servicemanagement::v1::CreateServiceConfigRequest 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::api::servicemanagement::v1::CreateServiceConfigRequest const &
Returns
Type
Description
StatusOr< google::api::Service >
virtual SubmitConfigSource(google::longrunning::Operation const &)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter
Name
Description
operation
google::longrunning::Operation const &
Returns
Type
Description
future< StatusOr< google::api::servicemanagement::v1::SubmitConfigSourceResponse > >
virtual ListServiceRollouts(google::api::servicemanagement::v1::ListServiceRolloutsRequest)
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::api::servicemanagement::v1::ListServiceRolloutsRequest
Returns
Type
Description
StreamRange< google::api::servicemanagement::v1::Rollout >
virtual GetServiceRollout(google::api::servicemanagement::v1::GetServiceRolloutRequest 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::api::servicemanagement::v1::GetServiceRolloutRequest const &
Returns
Type
Description
StatusOr< google::api::servicemanagement::v1::Rollout >
virtual CreateServiceRollout(google::longrunning::Operation const &)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter
Name
Description
operation
google::longrunning::Operation const &
Returns
Type
Description
future< StatusOr< google::api::servicemanagement::v1::Rollout > >
virtual GenerateConfigReport(google::api::servicemanagement::v1::GenerateConfigReportRequest 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::api::servicemanagement::v1::GenerateConfigReportRequest const &
Returns
Type
Description
StatusOr< google::api::servicemanagement::v1::GenerateConfigReportResponse >
virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest 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::iam::v1::SetIamPolicyRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::Policy >
virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest 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::iam::v1::GetIamPolicyRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::Policy >
virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest 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::iam::v1::TestIamPermissionsRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >
virtual ListOperations(google::longrunning::ListOperationsRequest)
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::longrunning::ListOperationsRequest
Returns
Type
Description
StreamRange< google::longrunning::Operation >
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.
[[["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-14 UTC."],[],[]]