Class MockServiceManagerConnection (2.24.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::api::servicemanagement::v1::CreateServiceRequest 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::CreateServiceRequest const &
Returns
Type Description
future< StatusOr< google::api::servicemanagement::v1::ManagedService > >

virtual DeleteService(google::api::servicemanagement::v1::DeleteServiceRequest 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::DeleteServiceRequest const &
Returns
Type Description
future< StatusOr< google::api::servicemanagement::v1::OperationMetadata > >

virtual UndeleteService(google::api::servicemanagement::v1::UndeleteServiceRequest 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::UndeleteServiceRequest 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::api::servicemanagement::v1::SubmitConfigSourceRequest 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::SubmitConfigSourceRequest 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::api::servicemanagement::v1::CreateServiceRolloutRequest 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::CreateServiceRolloutRequest 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 >