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 > > |
|