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(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::Gateway > > |
|
virtual UpdateGateway(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::Gateway > > |
|
virtual DeleteGateway(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation 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(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::Api > > |
|
virtual UpdateApi(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::Api > > |
|
virtual DeleteApi(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation 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(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::ApiConfig > > |
|
virtual UpdateApiConfig(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::ApiConfig > > |
|
virtual DeleteApiConfig(ExperimentalTag, google::longrunning::Operation const &)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameters |
Name |
Description |
|
ExperimentalTag
|
operation |
google::longrunning::Operation const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::apigateway::v1::OperationMetadata > > |
|