Class MockDataMigrationServiceConnection (2.21.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
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ListMigrationJobsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GetMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CreateMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::UpdateMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DeleteMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::StartMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::StopMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ResumeMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::PromoteMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::VerifyMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::RestartMigrationJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GenerateSshScriptRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GenerateTcpProxyScriptRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ListConnectionProfilesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GetConnectionProfileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CreateConnectionProfileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::UpdateConnectionProfileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DeleteConnectionProfileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CreatePrivateConnectionRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GetPrivateConnectionRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ListPrivateConnectionsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DeletePrivateConnectionRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GetConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ListConversionWorkspacesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CreateConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::UpdateConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DeleteConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CreateMappingRuleRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DeleteMappingRuleRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ListMappingRulesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::GetMappingRuleRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::SeedConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ImportMappingRulesRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ConvertConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::CommitConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::RollbackConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::ApplyConversionWorkspaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DescribeDatabaseEntitiesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::SearchBackgroundJobsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::DescribeConversionWorkspaceRevisionsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::clouddms::v1::FetchStaticIpsRequest
Returns
TypeDescription
StreamRange< std::string >