Class MockVmMigrationConnection (2.26.0)

A class to mock VmMigrationConnection.

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

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::vmmigration::v1::ListSourcesRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::Source >

virtual GetSource(google::cloud::vmmigration::v1::GetSourceRequest 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::vmmigration::v1::GetSourceRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::Source >

virtual CreateSource(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::vmmigration::v1::Source > >

virtual UpdateSource(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::vmmigration::v1::Source > >

virtual DeleteSource(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::vmmigration::v1::OperationMetadata > >

virtual FetchInventory(google::cloud::vmmigration::v1::FetchInventoryRequest 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::vmmigration::v1::FetchInventoryRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::FetchInventoryResponse >

virtual ListUtilizationReports(google::cloud::vmmigration::v1::ListUtilizationReportsRequest)

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::vmmigration::v1::ListUtilizationReportsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::UtilizationReport >

virtual GetUtilizationReport(google::cloud::vmmigration::v1::GetUtilizationReportRequest 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::vmmigration::v1::GetUtilizationReportRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::UtilizationReport >

virtual CreateUtilizationReport(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::vmmigration::v1::UtilizationReport > >

virtual DeleteUtilizationReport(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::vmmigration::v1::OperationMetadata > >

virtual ListDatacenterConnectors(google::cloud::vmmigration::v1::ListDatacenterConnectorsRequest)

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::vmmigration::v1::ListDatacenterConnectorsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::DatacenterConnector >

virtual GetDatacenterConnector(google::cloud::vmmigration::v1::GetDatacenterConnectorRequest 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::vmmigration::v1::GetDatacenterConnectorRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::DatacenterConnector >

virtual CreateDatacenterConnector(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::vmmigration::v1::DatacenterConnector > >

virtual DeleteDatacenterConnector(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::vmmigration::v1::OperationMetadata > >

virtual UpgradeAppliance(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::vmmigration::v1::UpgradeApplianceResponse > >

virtual CreateMigratingVm(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::vmmigration::v1::MigratingVm > >

virtual ListMigratingVms(google::cloud::vmmigration::v1::ListMigratingVmsRequest)

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::vmmigration::v1::ListMigratingVmsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::MigratingVm >

virtual GetMigratingVm(google::cloud::vmmigration::v1::GetMigratingVmRequest 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::vmmigration::v1::GetMigratingVmRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::MigratingVm >

virtual UpdateMigratingVm(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::vmmigration::v1::MigratingVm > >

virtual DeleteMigratingVm(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::vmmigration::v1::OperationMetadata > >

virtual StartMigration(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::vmmigration::v1::StartMigrationResponse > >

virtual ResumeMigration(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::vmmigration::v1::ResumeMigrationResponse > >

virtual PauseMigration(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::vmmigration::v1::PauseMigrationResponse > >

virtual FinalizeMigration(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::vmmigration::v1::FinalizeMigrationResponse > >

virtual CreateCloneJob(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::vmmigration::v1::CloneJob > >

virtual CancelCloneJob(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::vmmigration::v1::CancelCloneJobResponse > >

virtual ListCloneJobs(google::cloud::vmmigration::v1::ListCloneJobsRequest)

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::vmmigration::v1::ListCloneJobsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::CloneJob >

virtual GetCloneJob(google::cloud::vmmigration::v1::GetCloneJobRequest 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::vmmigration::v1::GetCloneJobRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::CloneJob >

virtual CreateCutoverJob(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::vmmigration::v1::CutoverJob > >

virtual CancelCutoverJob(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::vmmigration::v1::CancelCutoverJobResponse > >

virtual ListCutoverJobs(google::cloud::vmmigration::v1::ListCutoverJobsRequest)

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::vmmigration::v1::ListCutoverJobsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::CutoverJob >

virtual GetCutoverJob(google::cloud::vmmigration::v1::GetCutoverJobRequest 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::vmmigration::v1::GetCutoverJobRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::CutoverJob >

virtual ListGroups(google::cloud::vmmigration::v1::ListGroupsRequest)

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::vmmigration::v1::ListGroupsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::Group >

virtual GetGroup(google::cloud::vmmigration::v1::GetGroupRequest 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::vmmigration::v1::GetGroupRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::Group >

virtual CreateGroup(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::vmmigration::v1::Group > >

virtual UpdateGroup(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::vmmigration::v1::Group > >

virtual DeleteGroup(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::vmmigration::v1::OperationMetadata > >

virtual AddGroupMigration(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::vmmigration::v1::AddGroupMigrationResponse > >

virtual RemoveGroupMigration(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::vmmigration::v1::RemoveGroupMigrationResponse > >

virtual ListTargetProjects(google::cloud::vmmigration::v1::ListTargetProjectsRequest)

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::vmmigration::v1::ListTargetProjectsRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::TargetProject >

virtual GetTargetProject(google::cloud::vmmigration::v1::GetTargetProjectRequest 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::vmmigration::v1::GetTargetProjectRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::TargetProject >

virtual CreateTargetProject(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::vmmigration::v1::TargetProject > >

virtual UpdateTargetProject(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::vmmigration::v1::TargetProject > >

virtual DeleteTargetProject(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::vmmigration::v1::OperationMetadata > >

virtual ListReplicationCycles(google::cloud::vmmigration::v1::ListReplicationCyclesRequest)

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::vmmigration::v1::ListReplicationCyclesRequest
Returns
Type Description
StreamRange< google::cloud::vmmigration::v1::ReplicationCycle >

virtual GetReplicationCycle(google::cloud::vmmigration::v1::GetReplicationCycleRequest 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::vmmigration::v1::GetReplicationCycleRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::ReplicationCycle >