Class MockStorageInsightsConnection (2.22.0)

A class to mock StorageInsightsConnection.

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

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::storageinsights::v1::ListReportConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::storageinsights::v1::ReportConfig >

virtual GetReportConfig(google::cloud::storageinsights::v1::GetReportConfigRequest 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::storageinsights::v1::GetReportConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::storageinsights::v1::ReportConfig >

virtual CreateReportConfig(google::cloud::storageinsights::v1::CreateReportConfigRequest 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::storageinsights::v1::CreateReportConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::storageinsights::v1::ReportConfig >

virtual UpdateReportConfig(google::cloud::storageinsights::v1::UpdateReportConfigRequest 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::storageinsights::v1::UpdateReportConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::storageinsights::v1::ReportConfig >

virtual DeleteReportConfig(google::cloud::storageinsights::v1::DeleteReportConfigRequest 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::storageinsights::v1::DeleteReportConfigRequest const &
Returns
TypeDescription
Status

virtual ListReportDetails(google::cloud::storageinsights::v1::ListReportDetailsRequest)

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::storageinsights::v1::ListReportDetailsRequest
Returns
TypeDescription
StreamRange< google::cloud::storageinsights::v1::ReportDetail >

virtual GetReportDetail(google::cloud::storageinsights::v1::GetReportDetailRequest 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::storageinsights::v1::GetReportDetailRequest const &
Returns
TypeDescription
StatusOr< google::cloud::storageinsights::v1::ReportDetail >