Class MockMigrationCenterConnection (2.32.0)

A class to mock MigrationCenterConnection.

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

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::migrationcenter::v1::ListAssetsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::Asset >

virtual GetAsset(google::cloud::migrationcenter::v1::GetAssetRequest 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::migrationcenter::v1::GetAssetRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::Asset >

virtual UpdateAsset(google::cloud::migrationcenter::v1::UpdateAssetRequest 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::migrationcenter::v1::UpdateAssetRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::Asset >

virtual BatchUpdateAssets(google::cloud::migrationcenter::v1::BatchUpdateAssetsRequest 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::migrationcenter::v1::BatchUpdateAssetsRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::BatchUpdateAssetsResponse >

virtual DeleteAsset(google::cloud::migrationcenter::v1::DeleteAssetRequest 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::migrationcenter::v1::DeleteAssetRequest const &
Returns
Type Description
Status

virtual BatchDeleteAssets(google::cloud::migrationcenter::v1::BatchDeleteAssetsRequest 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::migrationcenter::v1::BatchDeleteAssetsRequest const &
Returns
Type Description
Status

virtual ReportAssetFrames(google::cloud::migrationcenter::v1::ReportAssetFramesRequest 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::migrationcenter::v1::ReportAssetFramesRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::ReportAssetFramesResponse >

virtual AggregateAssetsValues(google::cloud::migrationcenter::v1::AggregateAssetsValuesRequest 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::migrationcenter::v1::AggregateAssetsValuesRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::AggregateAssetsValuesResponse >

virtual CreateImportJob(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::migrationcenter::v1::ImportJob > >

virtual ListImportJobs(google::cloud::migrationcenter::v1::ListImportJobsRequest)

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::migrationcenter::v1::ListImportJobsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::ImportJob >

virtual GetImportJob(google::cloud::migrationcenter::v1::GetImportJobRequest 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::migrationcenter::v1::GetImportJobRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::ImportJob >

virtual DeleteImportJob(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::migrationcenter::v1::OperationMetadata > >

virtual UpdateImportJob(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::migrationcenter::v1::ImportJob > >

virtual ValidateImportJob(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::migrationcenter::v1::OperationMetadata > >

virtual RunImportJob(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::migrationcenter::v1::OperationMetadata > >

virtual GetImportDataFile(google::cloud::migrationcenter::v1::GetImportDataFileRequest 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::migrationcenter::v1::GetImportDataFileRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::ImportDataFile >

virtual ListImportDataFiles(google::cloud::migrationcenter::v1::ListImportDataFilesRequest)

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::migrationcenter::v1::ListImportDataFilesRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::ImportDataFile >

virtual CreateImportDataFile(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::migrationcenter::v1::ImportDataFile > >

virtual DeleteImportDataFile(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::migrationcenter::v1::OperationMetadata > >

virtual ListGroups(google::cloud::migrationcenter::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::migrationcenter::v1::ListGroupsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::Group >

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

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

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

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

virtual AddAssetsToGroup(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::migrationcenter::v1::Group > >

virtual RemoveAssetsFromGroup(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::migrationcenter::v1::Group > >

virtual ListErrorFrames(google::cloud::migrationcenter::v1::ListErrorFramesRequest)

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::migrationcenter::v1::ListErrorFramesRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::ErrorFrame >

virtual GetErrorFrame(google::cloud::migrationcenter::v1::GetErrorFrameRequest 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::migrationcenter::v1::GetErrorFrameRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::ErrorFrame >

virtual ListSources(google::cloud::migrationcenter::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::migrationcenter::v1::ListSourcesRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::Source >

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

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

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

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

virtual ListPreferenceSets(google::cloud::migrationcenter::v1::ListPreferenceSetsRequest)

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::migrationcenter::v1::ListPreferenceSetsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::PreferenceSet >

virtual GetPreferenceSet(google::cloud::migrationcenter::v1::GetPreferenceSetRequest 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::migrationcenter::v1::GetPreferenceSetRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::PreferenceSet >

virtual CreatePreferenceSet(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::migrationcenter::v1::PreferenceSet > >

virtual UpdatePreferenceSet(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::migrationcenter::v1::PreferenceSet > >

virtual DeletePreferenceSet(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::migrationcenter::v1::OperationMetadata > >

virtual GetSettings(google::cloud::migrationcenter::v1::GetSettingsRequest 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::migrationcenter::v1::GetSettingsRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::Settings >

virtual UpdateSettings(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::migrationcenter::v1::Settings > >

virtual CreateReportConfig(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::migrationcenter::v1::ReportConfig > >

virtual GetReportConfig(google::cloud::migrationcenter::v1::GetReportConfigRequest 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::migrationcenter::v1::GetReportConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::ReportConfig >

virtual ListReportConfigs(google::cloud::migrationcenter::v1::ListReportConfigsRequest)

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::migrationcenter::v1::ListReportConfigsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::ReportConfig >

virtual DeleteReportConfig(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::migrationcenter::v1::OperationMetadata > >

virtual CreateReport(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::migrationcenter::v1::Report > >

virtual GetReport(google::cloud::migrationcenter::v1::GetReportRequest 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::migrationcenter::v1::GetReportRequest const &
Returns
Type Description
StatusOr< google::cloud::migrationcenter::v1::Report >

virtual ListReports(google::cloud::migrationcenter::v1::ListReportsRequest)

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::migrationcenter::v1::ListReportsRequest
Returns
Type Description
StreamRange< google::cloud::migrationcenter::v1::Report >

virtual DeleteReport(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::migrationcenter::v1::OperationMetadata > >

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 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