Class MockDataMigrationServiceConnection (2.31.0-rc)

A class to mock DataMigrationServiceConnection.

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

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::clouddms::v1::ListMigrationJobsRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::MigrationJob >

virtual GetMigrationJob(google::cloud::clouddms::v1::GetMigrationJobRequest 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::clouddms::v1::GetMigrationJobRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::MigrationJob >

virtual CreateMigrationJob(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::clouddms::v1::MigrationJob > >

virtual UpdateMigrationJob(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::clouddms::v1::MigrationJob > >

virtual DeleteMigrationJob(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::clouddms::v1::OperationMetadata > >

virtual StartMigrationJob(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::clouddms::v1::MigrationJob > >

virtual StopMigrationJob(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::clouddms::v1::MigrationJob > >

virtual ResumeMigrationJob(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::clouddms::v1::MigrationJob > >

virtual PromoteMigrationJob(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::clouddms::v1::MigrationJob > >

virtual VerifyMigrationJob(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::clouddms::v1::MigrationJob > >

virtual RestartMigrationJob(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::clouddms::v1::MigrationJob > >

virtual GenerateSshScript(google::cloud::clouddms::v1::GenerateSshScriptRequest 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::clouddms::v1::GenerateSshScriptRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::SshScript >

virtual GenerateTcpProxyScript(google::cloud::clouddms::v1::GenerateTcpProxyScriptRequest 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::clouddms::v1::GenerateTcpProxyScriptRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::TcpProxyScript >

virtual ListConnectionProfiles(google::cloud::clouddms::v1::ListConnectionProfilesRequest)

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::clouddms::v1::ListConnectionProfilesRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::ConnectionProfile >

virtual GetConnectionProfile(google::cloud::clouddms::v1::GetConnectionProfileRequest 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::clouddms::v1::GetConnectionProfileRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::ConnectionProfile >

virtual CreateConnectionProfile(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::clouddms::v1::ConnectionProfile > >

virtual UpdateConnectionProfile(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::clouddms::v1::ConnectionProfile > >

virtual DeleteConnectionProfile(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::clouddms::v1::OperationMetadata > >

virtual CreatePrivateConnection(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::clouddms::v1::PrivateConnection > >

virtual GetPrivateConnection(google::cloud::clouddms::v1::GetPrivateConnectionRequest 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::clouddms::v1::GetPrivateConnectionRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::PrivateConnection >

virtual ListPrivateConnections(google::cloud::clouddms::v1::ListPrivateConnectionsRequest)

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::clouddms::v1::ListPrivateConnectionsRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::PrivateConnection >

virtual DeletePrivateConnection(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::clouddms::v1::OperationMetadata > >

virtual GetConversionWorkspace(google::cloud::clouddms::v1::GetConversionWorkspaceRequest 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::clouddms::v1::GetConversionWorkspaceRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::ConversionWorkspace >

virtual ListConversionWorkspaces(google::cloud::clouddms::v1::ListConversionWorkspacesRequest)

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::clouddms::v1::ListConversionWorkspacesRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::ConversionWorkspace >

virtual CreateConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual UpdateConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual DeleteConversionWorkspace(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::clouddms::v1::OperationMetadata > >

virtual CreateMappingRule(google::cloud::clouddms::v1::CreateMappingRuleRequest 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::clouddms::v1::CreateMappingRuleRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::MappingRule >

virtual DeleteMappingRule(google::cloud::clouddms::v1::DeleteMappingRuleRequest 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::clouddms::v1::DeleteMappingRuleRequest const &
Returns
Type Description
Status

virtual ListMappingRules(google::cloud::clouddms::v1::ListMappingRulesRequest)

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::clouddms::v1::ListMappingRulesRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::MappingRule >

virtual GetMappingRule(google::cloud::clouddms::v1::GetMappingRuleRequest 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::clouddms::v1::GetMappingRuleRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::MappingRule >

virtual SeedConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual ImportMappingRules(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::clouddms::v1::ConversionWorkspace > >

virtual ConvertConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual CommitConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual RollbackConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual ApplyConversionWorkspace(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::clouddms::v1::ConversionWorkspace > >

virtual DescribeDatabaseEntities(google::cloud::clouddms::v1::DescribeDatabaseEntitiesRequest)

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::clouddms::v1::DescribeDatabaseEntitiesRequest
Returns
Type Description
StreamRange< google::cloud::clouddms::v1::DatabaseEntity >

virtual SearchBackgroundJobs(google::cloud::clouddms::v1::SearchBackgroundJobsRequest 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::clouddms::v1::SearchBackgroundJobsRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::SearchBackgroundJobsResponse >

virtual DescribeConversionWorkspaceRevisions(google::cloud::clouddms::v1::DescribeConversionWorkspaceRevisionsRequest 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::clouddms::v1::DescribeConversionWorkspaceRevisionsRequest const &
Returns
Type Description
StatusOr< google::cloud::clouddms::v1::DescribeConversionWorkspaceRevisionsResponse >

virtual FetchStaticIps(google::cloud::clouddms::v1::FetchStaticIpsRequest)

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::clouddms::v1::FetchStaticIpsRequest
Returns
Type Description
StreamRange< std::string >

virtual ListLocations(google::cloud::location::ListLocationsRequest)

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::location::ListLocationsRequest
Returns
Type Description
StreamRange< google::cloud::location::Location >

virtual GetLocation(google::cloud::location::GetLocationRequest 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::location::GetLocationRequest const &
Returns
Type Description
StatusOr< google::cloud::location::Location >

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 >

virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteOperation(google::longrunning::DeleteOperationRequest 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::longrunning::DeleteOperationRequest const &
Returns
Type Description
Status

virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
Returns
Type Description
Status