A class to mock AMLConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type AMLClient
. To do so, construct an object of type AMLClient
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 ListInstances(google::cloud::financialservices::v1::ListInstancesRequest)
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::financialservices::v1::ListInstancesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::Instance > |
|
virtual GetInstance(google::cloud::financialservices::v1::GetInstanceRequest 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::financialservices::v1::GetInstanceRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::Instance > |
|
virtual CreateInstance(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::financialservices::v1::Instance > > |
|
virtual UpdateInstance(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::financialservices::v1::Instance > > |
|
virtual DeleteInstance(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::financialservices::v1::OperationMetadata > > |
|
virtual ImportRegisteredParties(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::financialservices::v1::ImportRegisteredPartiesResponse > > |
|
virtual ExportRegisteredParties(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::financialservices::v1::ExportRegisteredPartiesResponse > > |
|
virtual ListDatasets(google::cloud::financialservices::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::financialservices::v1::ListDatasetsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::Dataset > |
|
virtual GetDataset(google::cloud::financialservices::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::financialservices::v1::GetDatasetRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::Dataset > |
|
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::financialservices::v1::Dataset > > |
|
virtual UpdateDataset(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::financialservices::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::financialservices::v1::OperationMetadata > > |
|
virtual ListModels(google::cloud::financialservices::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::financialservices::v1::ListModelsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::Model > |
|
virtual GetModel(google::cloud::financialservices::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::financialservices::v1::GetModelRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::Model > |
|
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::financialservices::v1::Model > > |
|
virtual UpdateModel(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::financialservices::v1::Model > > |
|
virtual ExportModelMetadata(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::financialservices::v1::ExportModelMetadataResponse > > |
|
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::financialservices::v1::OperationMetadata > > |
|
virtual ListEngineConfigs(google::cloud::financialservices::v1::ListEngineConfigsRequest)
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::financialservices::v1::ListEngineConfigsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::EngineConfig > |
|
virtual GetEngineConfig(google::cloud::financialservices::v1::GetEngineConfigRequest 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::financialservices::v1::GetEngineConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::EngineConfig > |
|
virtual CreateEngineConfig(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::financialservices::v1::EngineConfig > > |
|
virtual UpdateEngineConfig(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::financialservices::v1::EngineConfig > > |
|
virtual ExportEngineConfigMetadata(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::financialservices::v1::ExportEngineConfigMetadataResponse > > |
|
virtual DeleteEngineConfig(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::financialservices::v1::OperationMetadata > > |
|
virtual GetEngineVersion(google::cloud::financialservices::v1::GetEngineVersionRequest 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::financialservices::v1::GetEngineVersionRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::EngineVersion > |
|
virtual ListEngineVersions(google::cloud::financialservices::v1::ListEngineVersionsRequest)
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::financialservices::v1::ListEngineVersionsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::EngineVersion > |
|
virtual ListPredictionResults(google::cloud::financialservices::v1::ListPredictionResultsRequest)
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::financialservices::v1::ListPredictionResultsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::PredictionResult > |
|
virtual GetPredictionResult(google::cloud::financialservices::v1::GetPredictionResultRequest 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::financialservices::v1::GetPredictionResultRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::PredictionResult > |
|
virtual CreatePredictionResult(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::financialservices::v1::PredictionResult > > |
|
virtual UpdatePredictionResult(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::financialservices::v1::PredictionResult > > |
|
virtual ExportPredictionResultMetadata(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::financialservices::v1::ExportPredictionResultMetadataResponse > > |
|
virtual DeletePredictionResult(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::financialservices::v1::OperationMetadata > > |
|
virtual ListBacktestResults(google::cloud::financialservices::v1::ListBacktestResultsRequest)
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::financialservices::v1::ListBacktestResultsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::financialservices::v1::BacktestResult > |
|
virtual GetBacktestResult(google::cloud::financialservices::v1::GetBacktestResultRequest 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::financialservices::v1::GetBacktestResultRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::financialservices::v1::BacktestResult > |
|
virtual CreateBacktestResult(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::financialservices::v1::BacktestResult > > |
|
virtual UpdateBacktestResult(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::financialservices::v1::BacktestResult > > |
|
virtual ExportBacktestResultMetadata(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::financialservices::v1::ExportBacktestResultMetadataResponse > > |
|
virtual DeleteBacktestResult(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::financialservices::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 |
|