Class MockMigrationCenterConnection (2.22.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
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListAssetsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetAssetRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::UpdateAssetRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::BatchUpdateAssetsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::DeleteAssetRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::BatchDeleteAssetsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ReportAssetFramesRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::AggregateAssetsValuesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::AggregateAssetsValuesResponse >

virtual CreateImportJob(google::cloud::migrationcenter::v1::CreateImportJobRequest 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::migrationcenter::v1::CreateImportJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListImportJobsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetImportJobRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::ImportJob >

virtual DeleteImportJob(google::cloud::migrationcenter::v1::DeleteImportJobRequest 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::migrationcenter::v1::DeleteImportJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::OperationMetadata > >

virtual UpdateImportJob(google::cloud::migrationcenter::v1::UpdateImportJobRequest 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::migrationcenter::v1::UpdateImportJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::ImportJob > >

virtual ValidateImportJob(google::cloud::migrationcenter::v1::ValidateImportJobRequest 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::migrationcenter::v1::ValidateImportJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::OperationMetadata > >

virtual RunImportJob(google::cloud::migrationcenter::v1::RunImportJobRequest 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::migrationcenter::v1::RunImportJobRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetImportDataFileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListImportDataFilesRequest
Returns
TypeDescription
StreamRange< google::cloud::migrationcenter::v1::ImportDataFile >

virtual CreateImportDataFile(google::cloud::migrationcenter::v1::CreateImportDataFileRequest 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::migrationcenter::v1::CreateImportDataFileRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::ImportDataFile > >

virtual DeleteImportDataFile(google::cloud::migrationcenter::v1::DeleteImportDataFileRequest 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::migrationcenter::v1::DeleteImportDataFileRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListGroupsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetGroupRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::Group >

virtual CreateGroup(google::cloud::migrationcenter::v1::CreateGroupRequest 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::migrationcenter::v1::CreateGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Group > >

virtual UpdateGroup(google::cloud::migrationcenter::v1::UpdateGroupRequest 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::migrationcenter::v1::UpdateGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Group > >

virtual DeleteGroup(google::cloud::migrationcenter::v1::DeleteGroupRequest 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::migrationcenter::v1::DeleteGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::OperationMetadata > >

virtual AddAssetsToGroup(google::cloud::migrationcenter::v1::AddAssetsToGroupRequest 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::migrationcenter::v1::AddAssetsToGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Group > >

virtual RemoveAssetsFromGroup(google::cloud::migrationcenter::v1::RemoveAssetsFromGroupRequest 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::migrationcenter::v1::RemoveAssetsFromGroupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListErrorFramesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetErrorFrameRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListSourcesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetSourceRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::Source >

virtual CreateSource(google::cloud::migrationcenter::v1::CreateSourceRequest 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::migrationcenter::v1::CreateSourceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Source > >

virtual UpdateSource(google::cloud::migrationcenter::v1::UpdateSourceRequest 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::migrationcenter::v1::UpdateSourceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Source > >

virtual DeleteSource(google::cloud::migrationcenter::v1::DeleteSourceRequest 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::migrationcenter::v1::DeleteSourceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListPreferenceSetsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetPreferenceSetRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::PreferenceSet >

virtual CreatePreferenceSet(google::cloud::migrationcenter::v1::CreatePreferenceSetRequest 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::migrationcenter::v1::CreatePreferenceSetRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::PreferenceSet > >

virtual UpdatePreferenceSet(google::cloud::migrationcenter::v1::UpdatePreferenceSetRequest 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::migrationcenter::v1::UpdatePreferenceSetRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::PreferenceSet > >

virtual DeletePreferenceSet(google::cloud::migrationcenter::v1::DeletePreferenceSetRequest 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::migrationcenter::v1::DeletePreferenceSetRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetSettingsRequest const &
Returns
TypeDescription
StatusOr< google::cloud::migrationcenter::v1::Settings >

virtual UpdateSettings(google::cloud::migrationcenter::v1::UpdateSettingsRequest 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::migrationcenter::v1::UpdateSettingsRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::Settings > >

virtual CreateReportConfig(google::cloud::migrationcenter::v1::CreateReportConfigRequest 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::migrationcenter::v1::CreateReportConfigRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetReportConfigRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListReportConfigsRequest
Returns
TypeDescription
StreamRange< google::cloud::migrationcenter::v1::ReportConfig >

virtual DeleteReportConfig(google::cloud::migrationcenter::v1::DeleteReportConfigRequest 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::migrationcenter::v1::DeleteReportConfigRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::OperationMetadata > >

virtual CreateReport(google::cloud::migrationcenter::v1::CreateReportRequest 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::migrationcenter::v1::CreateReportRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::GetReportRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::migrationcenter::v1::ListReportsRequest
Returns
TypeDescription
StreamRange< google::cloud::migrationcenter::v1::Report >

virtual DeleteReport(google::cloud::migrationcenter::v1::DeleteReportRequest 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::migrationcenter::v1::DeleteReportRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::migrationcenter::v1::OperationMetadata > >