A class to mock DataplexServiceConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type DataplexServiceClient
. To do so, construct an object of type DataplexServiceClient
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 CreateLake(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::cloud::dataplex::v1::Lake > > |
|
virtual UpdateLake(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::cloud::dataplex::v1::Lake > > |
|
virtual DeleteLake(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::cloud::dataplex::v1::OperationMetadata > > |
|
virtual ListLakes(google::cloud::dataplex::v1::ListLakesRequest)
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::cloud::dataplex::v1::ListLakesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Lake > |
|
virtual GetLake(google::cloud::dataplex::v1::GetLakeRequest 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::cloud::dataplex::v1::GetLakeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Lake > |
|
virtual ListLakeActions(google::cloud::dataplex::v1::ListLakeActionsRequest)
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::cloud::dataplex::v1::ListLakeActionsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Action > |
|
virtual CreateZone(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::cloud::dataplex::v1::Zone > > |
|
virtual UpdateZone(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::cloud::dataplex::v1::Zone > > |
|
virtual DeleteZone(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::cloud::dataplex::v1::OperationMetadata > > |
|
virtual ListZones(google::cloud::dataplex::v1::ListZonesRequest)
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::cloud::dataplex::v1::ListZonesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Zone > |
|
virtual GetZone(google::cloud::dataplex::v1::GetZoneRequest 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::cloud::dataplex::v1::GetZoneRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Zone > |
|
virtual ListZoneActions(google::cloud::dataplex::v1::ListZoneActionsRequest)
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::cloud::dataplex::v1::ListZoneActionsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Action > |
|
virtual CreateAsset(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::cloud::dataplex::v1::Asset > > |
|
virtual UpdateAsset(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::cloud::dataplex::v1::Asset > > |
|
virtual DeleteAsset(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::cloud::dataplex::v1::OperationMetadata > > |
|
virtual ListAssets(google::cloud::dataplex::v1::ListAssetsRequest)
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::cloud::dataplex::v1::ListAssetsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Asset > |
|
virtual GetAsset(google::cloud::dataplex::v1::GetAssetRequest 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::cloud::dataplex::v1::GetAssetRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Asset > |
|
virtual ListAssetActions(google::cloud::dataplex::v1::ListAssetActionsRequest)
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::cloud::dataplex::v1::ListAssetActionsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Action > |
|
virtual CreateTask(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::cloud::dataplex::v1::Task > > |
|
virtual UpdateTask(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::cloud::dataplex::v1::Task > > |
|
virtual DeleteTask(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::cloud::dataplex::v1::OperationMetadata > > |
|
virtual ListTasks(google::cloud::dataplex::v1::ListTasksRequest)
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::cloud::dataplex::v1::ListTasksRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Task > |
|
virtual GetTask(google::cloud::dataplex::v1::GetTaskRequest 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::cloud::dataplex::v1::GetTaskRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Task > |
|
virtual ListJobs(google::cloud::dataplex::v1::ListJobsRequest)
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::cloud::dataplex::v1::ListJobsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Job > |
|
virtual RunTask(google::cloud::dataplex::v1::RunTaskRequest 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::cloud::dataplex::v1::RunTaskRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::RunTaskResponse > |
|
virtual GetJob(google::cloud::dataplex::v1::GetJobRequest 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::cloud::dataplex::v1::GetJobRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Job > |
|
virtual CancelJob(google::cloud::dataplex::v1::CancelJobRequest 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::cloud::dataplex::v1::CancelJobRequest const &
|
Returns |
Type |
Description |
Status |
|
virtual CreateEnvironment(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::cloud::dataplex::v1::Environment > > |
|
virtual UpdateEnvironment(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::cloud::dataplex::v1::Environment > > |
|
virtual DeleteEnvironment(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::cloud::dataplex::v1::OperationMetadata > > |
|
virtual ListEnvironments(google::cloud::dataplex::v1::ListEnvironmentsRequest)
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::cloud::dataplex::v1::ListEnvironmentsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Environment > |
|
virtual GetEnvironment(google::cloud::dataplex::v1::GetEnvironmentRequest 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::cloud::dataplex::v1::GetEnvironmentRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Environment > |
|
virtual ListSessions(google::cloud::dataplex::v1::ListSessionsRequest)
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::cloud::dataplex::v1::ListSessionsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Session > |
|