Class MockConfigConnection (2.21.0)

A class to mock ConfigConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ConfigClient. To do so, construct an object of type ConfigClient 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 ListDeployments(google::cloud::config::v1::ListDeploymentsRequest)

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

Parameter
NameDescription
request google::cloud::config::v1::ListDeploymentsRequest
Returns
TypeDescription
StreamRange< google::cloud::config::v1::Deployment >

virtual GetDeployment(google::cloud::config::v1::GetDeploymentRequest 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::cloud::config::v1::GetDeploymentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Deployment >

virtual CreateDeployment(google::cloud::config::v1::CreateDeploymentRequest 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::cloud::config::v1::CreateDeploymentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UpdateDeployment(google::cloud::config::v1::UpdateDeploymentRequest 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::cloud::config::v1::UpdateDeploymentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual DeleteDeployment(google::cloud::config::v1::DeleteDeploymentRequest 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::cloud::config::v1::DeleteDeploymentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual ListRevisions(google::cloud::config::v1::ListRevisionsRequest)

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

Parameter
NameDescription
request google::cloud::config::v1::ListRevisionsRequest
Returns
TypeDescription
StreamRange< google::cloud::config::v1::Revision >

virtual GetRevision(google::cloud::config::v1::GetRevisionRequest 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::cloud::config::v1::GetRevisionRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Revision >

virtual GetResource(google::cloud::config::v1::GetResourceRequest 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::cloud::config::v1::GetResourceRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Resource >

virtual ListResources(google::cloud::config::v1::ListResourcesRequest)

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

Parameter
NameDescription
request google::cloud::config::v1::ListResourcesRequest
Returns
TypeDescription
StreamRange< google::cloud::config::v1::Resource >

virtual ExportDeploymentStatefile(google::cloud::config::v1::ExportDeploymentStatefileRequest 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::cloud::config::v1::ExportDeploymentStatefileRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Statefile >

virtual ExportRevisionStatefile(google::cloud::config::v1::ExportRevisionStatefileRequest 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::cloud::config::v1::ExportRevisionStatefileRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Statefile >

virtual ImportStatefile(google::cloud::config::v1::ImportStatefileRequest 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::cloud::config::v1::ImportStatefileRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Statefile >

virtual DeleteStatefile(google::cloud::config::v1::DeleteStatefileRequest 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::cloud::config::v1::DeleteStatefileRequest const &
Returns
TypeDescription
Status

virtual LockDeployment(google::cloud::config::v1::LockDeploymentRequest 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::cloud::config::v1::LockDeploymentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UnlockDeployment(google::cloud::config::v1::UnlockDeploymentRequest 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::cloud::config::v1::UnlockDeploymentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual ExportLockInfo(google::cloud::config::v1::ExportLockInfoRequest 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::cloud::config::v1::ExportLockInfoRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::LockInfo >

virtual CreatePreview(google::cloud::config::v1::CreatePreviewRequest 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::cloud::config::v1::CreatePreviewRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Preview > >

virtual GetPreview(google::cloud::config::v1::GetPreviewRequest 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::cloud::config::v1::GetPreviewRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::Preview >

virtual ListPreviews(google::cloud::config::v1::ListPreviewsRequest)

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

Parameter
NameDescription
request google::cloud::config::v1::ListPreviewsRequest
Returns
TypeDescription
StreamRange< google::cloud::config::v1::Preview >

virtual DeletePreview(google::cloud::config::v1::DeletePreviewRequest 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::cloud::config::v1::DeletePreviewRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::config::v1::Preview > >

virtual ExportPreviewResult(google::cloud::config::v1::ExportPreviewResultRequest 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::cloud::config::v1::ExportPreviewResultRequest const &
Returns
TypeDescription
StatusOr< google::cloud::config::v1::ExportPreviewResultResponse >