Send feedback
Class MockAutoMlConnection (2.35.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.35.0 keyboard_arrow_down
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::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::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::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::automl::v1::OperationMetadata > >
virtual ImportData(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::automl::v1::OperationMetadata > >
virtual ExportData(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::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::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::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::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::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::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::automl::v1::OperationMetadata > >
virtual UndeployModel(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::automl::v1::OperationMetadata > >
virtual ExportModel(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::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 >
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[],[]]