Class MockServiceManagerConnection (2.33.0)

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 >