Class MockMigrationCenterConnection (2.26.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(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::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(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::migrationcenter::v1::OperationMetadata > >

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

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

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

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

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

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

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

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

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

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