Send feedback
Class MockApiGatewayServiceConnection (2.17.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.17.0 keyboard_arrow_down
A class to mock ApiGatewayServiceConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type ApiGatewayServiceClient
. To do so, construct an object of type ApiGatewayServiceClient
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 ListGateways(google::cloud::apigateway::v1::ListGatewaysRequest)
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::apigateway::v1::ListGatewaysRequest
Returns
Type
Description
StreamRange< google::cloud::apigateway::v1::Gateway >
virtual GetGateway(google::cloud::apigateway::v1::GetGatewayRequest 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::apigateway::v1::GetGatewayRequest const &
Returns
Type
Description
StatusOr< google::cloud::apigateway::v1::Gateway >
virtual CreateGateway(google::cloud::apigateway::v1::CreateGatewayRequest 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::apigateway::v1::CreateGatewayRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::Gateway > >
virtual UpdateGateway(google::cloud::apigateway::v1::UpdateGatewayRequest 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::apigateway::v1::UpdateGatewayRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::Gateway > >
virtual DeleteGateway(google::cloud::apigateway::v1::DeleteGatewayRequest 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::apigateway::v1::DeleteGatewayRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::OperationMetadata > >
virtual ListApis(google::cloud::apigateway::v1::ListApisRequest)
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::apigateway::v1::ListApisRequest
Returns
Type
Description
StreamRange< google::cloud::apigateway::v1::Api >
virtual GetApi(google::cloud::apigateway::v1::GetApiRequest 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::apigateway::v1::GetApiRequest const &
Returns
Type
Description
StatusOr< google::cloud::apigateway::v1::Api >
virtual CreateApi(google::cloud::apigateway::v1::CreateApiRequest 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::apigateway::v1::CreateApiRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::Api > >
virtual UpdateApi(google::cloud::apigateway::v1::UpdateApiRequest 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::apigateway::v1::UpdateApiRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::Api > >
virtual DeleteApi(google::cloud::apigateway::v1::DeleteApiRequest 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::apigateway::v1::DeleteApiRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::OperationMetadata > >
virtual ListApiConfigs(google::cloud::apigateway::v1::ListApiConfigsRequest)
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::apigateway::v1::ListApiConfigsRequest
Returns
Type
Description
StreamRange< google::cloud::apigateway::v1::ApiConfig >
virtual GetApiConfig(google::cloud::apigateway::v1::GetApiConfigRequest 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::apigateway::v1::GetApiConfigRequest const &
Returns
Type
Description
StatusOr< google::cloud::apigateway::v1::ApiConfig >
virtual CreateApiConfig(google::cloud::apigateway::v1::CreateApiConfigRequest 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::apigateway::v1::CreateApiConfigRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::ApiConfig > >
virtual UpdateApiConfig(google::cloud::apigateway::v1::UpdateApiConfigRequest 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::apigateway::v1::UpdateApiConfigRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::ApiConfig > >
virtual DeleteApiConfig(google::cloud::apigateway::v1::DeleteApiConfigRequest 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::apigateway::v1::DeleteApiConfigRequest const &
Returns
Type
Description
future< StatusOr< google::cloud::apigateway::v1::OperationMetadata > >
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-01-27 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-01-27 UTC."],[],[]]