Class MockDataMigrationServiceConnection (2.18.0)

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::cloud::clouddms::v1::CreateMigrationJobRequest 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::CreateMigrationJobRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

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

virtual DeleteMigrationJob(google::cloud::clouddms::v1::DeleteMigrationJobRequest 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::DeleteMigrationJobRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::OperationMetadata > >

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

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

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

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

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

virtual RestartMigrationJob(google::cloud::clouddms::v1::RestartMigrationJobRequest 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::RestartMigrationJobRequest 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::cloud::clouddms::v1::CreateConnectionProfileRequest 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::CreateConnectionProfileRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConnectionProfile > >

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

virtual DeleteConnectionProfile(google::cloud::clouddms::v1::DeleteConnectionProfileRequest 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::DeleteConnectionProfileRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::OperationMetadata > >

virtual CreatePrivateConnection(google::cloud::clouddms::v1::CreatePrivateConnectionRequest 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::CreatePrivateConnectionRequest 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::cloud::clouddms::v1::DeletePrivateConnectionRequest 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::DeletePrivateConnectionRequest 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::cloud::clouddms::v1::CreateConversionWorkspaceRequest 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::CreateConversionWorkspaceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

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

virtual DeleteConversionWorkspace(google::cloud::clouddms::v1::DeleteConversionWorkspaceRequest 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::DeleteConversionWorkspaceRequest 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::cloud::clouddms::v1::SeedConversionWorkspaceRequest 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::SeedConversionWorkspaceRequest const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

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

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

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

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

virtual ApplyConversionWorkspace(google::cloud::clouddms::v1::ApplyConversionWorkspaceRequest 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::ApplyConversionWorkspaceRequest 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 >