Class MockDataMigrationServiceConnection (2.26.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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual UpdateMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual DeleteMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::OperationMetadata > >

virtual StartMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual StopMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual ResumeMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual PromoteMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual VerifyMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::MigrationJob > >

virtual RestartMigrationJob(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConnectionProfile > >

virtual UpdateConnectionProfile(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConnectionProfile > >

virtual DeleteConnectionProfile(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::OperationMetadata > >

virtual CreatePrivateConnection(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual UpdateConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual DeleteConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual ImportMappingRules(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual ConvertConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual CommitConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual RollbackConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::clouddms::v1::ConversionWorkspace > >

virtual ApplyConversionWorkspace(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
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 >