Class MockAutoMlConnection (2.24.0)

A class to mock AutoMlConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type AutoMlClient. To do so, construct an object of type AutoMlClient 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 CreateDataset(google::cloud::automl::v1::CreateDatasetRequest 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::automl::v1::CreateDatasetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Dataset > >

virtual GetDataset(google::cloud::automl::v1::GetDatasetRequest 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::automl::v1::GetDatasetRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

virtual ListDatasets(google::cloud::automl::v1::ListDatasetsRequest)

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::automl::v1::ListDatasetsRequest
Returns
Type Description
StreamRange< google::cloud::automl::v1::Dataset >

virtual UpdateDataset(google::cloud::automl::v1::UpdateDatasetRequest 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::automl::v1::UpdateDatasetRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

virtual DeleteDataset(google::cloud::automl::v1::DeleteDatasetRequest 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::automl::v1::DeleteDatasetRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual ImportData(google::cloud::automl::v1::ImportDataRequest 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::automl::v1::ImportDataRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual ExportData(google::cloud::automl::v1::ExportDataRequest 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::automl::v1::ExportDataRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual GetAnnotationSpec(google::cloud::automl::v1::GetAnnotationSpecRequest 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::automl::v1::GetAnnotationSpecRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::AnnotationSpec >

virtual CreateModel(google::cloud::automl::v1::CreateModelRequest 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::automl::v1::CreateModelRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Model > >

virtual GetModel(google::cloud::automl::v1::GetModelRequest 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::automl::v1::GetModelRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

virtual ListModels(google::cloud::automl::v1::ListModelsRequest)

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::automl::v1::ListModelsRequest
Returns
Type Description
StreamRange< google::cloud::automl::v1::Model >

virtual DeleteModel(google::cloud::automl::v1::DeleteModelRequest 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::automl::v1::DeleteModelRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual UpdateModel(google::cloud::automl::v1::UpdateModelRequest 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::automl::v1::UpdateModelRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

virtual DeployModel(google::cloud::automl::v1::DeployModelRequest 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::automl::v1::DeployModelRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual UndeployModel(google::cloud::automl::v1::UndeployModelRequest 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::automl::v1::UndeployModelRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual ExportModel(google::cloud::automl::v1::ExportModelRequest 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::automl::v1::ExportModelRequest const &
Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

virtual GetModelEvaluation(google::cloud::automl::v1::GetModelEvaluationRequest 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::automl::v1::GetModelEvaluationRequest const &
Returns
Type Description
StatusOr< google::cloud::automl::v1::ModelEvaluation >

virtual ListModelEvaluations(google::cloud::automl::v1::ListModelEvaluationsRequest)

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::automl::v1::ListModelEvaluationsRequest
Returns
Type Description
StreamRange< google::cloud::automl::v1::ModelEvaluation >