Class MockApiGatewayServiceConnection (2.27.0)

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::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::apigateway::v1::Gateway > >

virtual UpdateGateway(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::apigateway::v1::Gateway > >

virtual DeleteGateway(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::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::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::apigateway::v1::Api > >

virtual UpdateApi(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::apigateway::v1::Api > >

virtual DeleteApi(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::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::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::apigateway::v1::ApiConfig > >

virtual UpdateApiConfig(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::apigateway::v1::ApiConfig > >

virtual DeleteApiConfig(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::apigateway::v1::OperationMetadata > >